Commit Graph

53757 Commits

Author SHA1 Message Date
Timm Bäder
fb81686a89 vulkan: Fix release builds 2018-01-21 15:23:17 +01:00
Timm Bäder
d6c2ef3b71 combobox: Remove some unneeded includes 2018-01-21 11:01:32 +01:00
Simon McVittie
e22990302a Set GDK_WINDOW_STATE_TILED if any edge is tiled
This state flag is used in several places in GTK+, for example to
ignore RESIZE_INC hints if tiled. Setting it is also necessary for
backwards compatibility with applications that changed their behaviour
when tiled, such as GNOME Terminal and its MATE fork.

Signed-off-by: Simon McVittie <smcv@debian.org>

https://bugzilla.gnome.org/show_bug.cgi?id=789357
2018-01-20 13:10:49 +01:00
Georges Basile Stavracas Neto
42ff22f222 display-x11: Unset tiled state if _GTK_EDGE_CONSTRAINTS is supported
Commit c415bef5de introduced support for the new _GTK_EDGE_CONSTRAINTS
atom. If the compositor supports that atom, however, we were always
setting the tiled state, even if no actual tiling information is
available, where the correct action is to completely remove any traces
of the tiled state.

Fix that by correctly removing the tiled state when compositor supports
_GTK_EDGE_CONSTRAINTS Xatom.

https://bugzilla.gnome.org/show_bug.cgi?id=788516
2018-01-20 13:10:42 +01:00
Timm Bäder
4d36a0bf35 entrycompletion: Realize toplevel before attempting a grab
Otherwise, gtk_widget_get_window returns NULL and we can't successfully
perform a grab via the later gdk_set_grab call. This fixes the entry
completion in the file chooser not working.
2018-01-19 22:39:23 +01:00
Matthias Clasen
af0d876bb7 tests: Remove some unneeded gtk_widget_show calls
Widgets are visible by default now.
2018-01-19 23:29:13 +03:00
Matthias Clasen
ffef28a7e8 iconview: Fix updates with filter models
Filter models rely on views taking a ref on every node
they care about. GtkIconView was not doing that. Amazingly,
this has never shown up in a bug so far, until I spotted
the fallout in gnome-font-viewer.
2018-01-19 23:29:13 +03:00
Matthias Clasen
f942d6f53c Add a test for ::row-changed vs node refs
Test that filter models propagate ::row-changed if there is
an external reference on the node, and not otherwise. This
is showing up in buggy icon view behaviour, where the icon
view is not redrawing if the content changes in a model that
is below a filter model.
2018-01-19 23:29:13 +03:00
Carlos Garnacho
7d9af6d700 gtkwindow: Disconnect GdkSeat::device-removed callback on finalize
Otherwise dangling callbacks may lead to crashes.
2018-01-19 18:47:21 +01:00
Timm Bäder
8f4e0705dc gl renderer: Fix shadow node child offset
We shouldn't apply the shadow offset when drawing the child offscreen,
instead apply it afterwards when we draw it to the current render
target.
2018-01-19 15:00:22 +01:00
Timm Bäder
87bdfbb02c testsuite: Add another gl renderer test case 2018-01-19 14:59:31 +01:00
Timm Bäder
e4be37eb60 linkbutton: Only set widget cursor once 2018-01-19 13:21:41 +01:00
Timm Bäder
8224e7ac72 inspector: Allow picking insensitive widgets
The default gtk_widget_contains/gtk_widget_pick don't consider
insensitive widgets.
2018-01-19 10:16:15 +01:00
Timm Bäder
2dca8f935c csswidgetnode: Avoid some unnecessary work
The later code would just ref both styles and not do anything else.
2018-01-19 09:57:49 +01:00
Timm Bäder
f595c0dc1b widget-factory: Fix some layout issues
We have to explicitly set some of these to their default values so
expand-set is TRUE and the boxes stop propagating their expansion state
up the hierarchy.
2018-01-19 09:53:39 +01:00
Timm Bäder
3265013268 textview: Remove some stray debugging output
Leftover from 7046463b88
2018-01-19 08:17:03 +01:00
Matthias Clasen
351559fcfa Simplify all ui files again
Now even simpler!
2018-01-18 17:53:44 -05:00
Matthias Clasen
6c805ecb0f builder-tool: Try harder to find types
If g_type_from_name fails, try gtk_builder_get_type_from_name
before giving up. This fixes cases like GtkPrinterOptionWidget.
2018-01-18 17:45:12 -05:00
Timm Bäder
8a432b42a2 window: Ignore gtk_window_close calls from close-request handlers 2018-01-18 15:10:49 +01:00
Timm Bäder
aee4634ee5 widget: Always assign values to out parameter in translate_coordinates
safe guard against people using the returned coordinate values without
checking the return value of gtk_widget_translate_coordinates.
2018-01-18 14:45:13 +01:00
Timm Bäder
cc9a4c1720 widget: Initialize a local variable
We will later pass this variable on to some other functions, so be safe
against them using the value.
2018-01-18 14:45:13 +01:00
Timm Bäder
d607312080 aboutdialog: Only close on delete events
Clicking on the Credits button should not close the dialog.
2018-01-18 14:45:08 +01:00
Timm Bäder
41dac661a0 fontchooswerwidget: Center spinbutton next to scales vertically 2018-01-18 09:40:19 +01:00
Timm Bäder
41a922928e gl renderer: Render GL textures upside down
These come from an FBO so we need to flip the texture coords on the y
axis, just like we do everywhere else.
2018-01-18 08:21:11 +01:00
Matthias Clasen
182272c0ab Revert "inspector: Stop adding event controllers to the object tree"
This reverts commit 8f3cb2658a.

This didn't quite work out, since being in the object tree is
a prerequisite for showing up in the property editor.
2018-01-17 23:49:17 -05:00
Matthias Clasen
e1d81d096c Document new texture api 2018-01-17 21:45:08 -05:00
Matthias Clasen
47b7bfd2ba Use the new api to release resources
When we unrealize a GL area with outstanding textures,
call gdk_texture_release_gl on them to avoid later crashes.
2018-01-17 20:19:19 -05:00
Matthias Clasen
5e302ae2cc Add a way to release GL resources
The inspector may hold on to render nodes and textures
beyond the lifetime of the widget (and thus the GL
resources). To handle this situation, allow the widget
to explicitly release the GL resources, and make
the texture available on the clent-side as a cairo
surface. This lets the recorder still show the content
after the widget is gone.
2018-01-17 20:15:45 -05:00
Matthias Clasen
34c63b8e4f glarea: Drop the dispose vfunc
This was causing us to leak, in the following scenario:
1) gtk_widget_destroy is called on a GL area
2) dispose is run and clears the context
3) the GL area is unrealized, but the context is already cleared,
   so we leak all the GL buffers
2018-01-17 19:49:52 -05:00
Matthias Clasen
0429008b16 glarea: Always delete textures on unrealize
We need to make the context current for deleting
textures as well, so just do it unconditionally.
2018-01-17 19:49:05 -05:00
Matthias Clasen
6ea827cde5 glarea: Avoid a crash
We must only delete the texture if it is not NULL.
2018-01-17 19:48:33 -05:00
Matthias Clasen
cdb2fcb554 gdkgears: add a way to remove gears
This is needed to test the GL resource cleanup
code paths.
2018-01-17 19:47:45 -05:00
Matthias Clasen
4f50bf23d3 glarea: Add a pool for GL textures
Handle the situation that a GL texture might remain
in use (e.g. by a slow frame, or by the recorder)
In that case, we can't modify it but must use a
new one. Keep a pool of GL textures for this eventuality.
2018-01-17 19:15:14 -05:00
Matthias Clasen
18dc994de7 inspector: Don't leak recordings
g_list_model_get_item is transfer full, so we need
to drop the references we get from it. This was showing
up while testing the GL texture cache in GtkGLArea.
2018-01-17 19:12:55 -05:00
Timm Bäder
5e7b3030b9 rendernodeimpl: Fix a crash
We may get a NULL renderer here.
2018-01-17 21:57:20 +01:00
Timm Bäder
7c47c7cdaf applicationwindow: Fix measure implementation
Really calculate the menubar height, not the width.
2018-01-17 21:57:20 +01:00
Timm Bäder
e7b3909fd1 sizerequest: Fix for_size adjustment
We need to pull the proper size from the size request cache and adjust
it accordingly.
2018-01-17 21:57:20 +01:00
Timm Bäder
27c76db956 box: Simplify some code
All out varibles in measure implementations must be non-null and -1 is
the default value for the baseline parameters.
2018-01-17 21:57:20 +01:00
Timm Bäder
e763dac72e box: Remove self assignment 2018-01-17 21:57:19 +01:00
Timm Bäder
8ab2c79b77 box: Remove useless if statement
We already check right before this one whether child->pack != packing
and if so, we continue to the next iteration. So, no need to check again
whether the inverted condition child->pack == packing is true, because
it is.
2018-01-17 21:57:19 +01:00
Timm Bäder
12be5ccbb7 label: Update layout width directly form allocation
For the one update_layout_width call in size_allocate, we can just use
the passed-in allocation width instead of a separate (relatively slow)
gtk_widget_get_width call.
2018-01-17 21:57:19 +01:00
Timm Bäder
8ad1b09a3a widget: Clip redrawn area to widget clip
The clip can already be modified in size_allocate, so we never want a
widget to invalidate more than its actual clip region.
2018-01-17 21:57:19 +01:00
Timm Bäder
c2d4f05ce0 box: Remove some unneeded checks
We only call this function from the measure implementation and we should
never get NULL pointers there.
2018-01-17 21:57:19 +01:00
Timm Bäder
c475047501 box: Remove an unnecessary local variable 2018-01-17 21:57:19 +01:00
Timm Bäder
3604816b9c box: Use GtkWidget's widget list in get_size 2018-01-17 21:57:19 +01:00
Timm Bäder
cb0d2616ff listbox: Don't assume that row child == focus widget
With widgets supporting child widgets and custom GtkListBoxRow
subclasses, this might not be true.
2018-01-17 21:57:19 +01:00
Timm Bäder
229ef9d776 widget: Remove reparent special case
Since gtk_widget_reparent doesn't exist anymore, we can also remove this
special case.
2018-01-17 21:57:19 +01:00
Timm Bäder
d3329bb36b container: Remove some unused includes 2018-01-17 21:57:19 +01:00
Timm Bäder
5590a2a943 viewport: Remove some unused includes 2018-01-17 21:57:19 +01:00
Matthias Clasen
736ccd34f0 gl area: Avoid trivialities
If we have zero pixels, no need to snapshot anything,
and produce GL errors while doing so.
2018-01-17 14:43:50 -05:00