Store a link to the tree in the root node. This allows looking up the
tree in O(log N) from the node without any extra memory usage.
This is useful because code can just store a pointer to the node and
doesn't need to keep the tree pointer around. And that can (for large
trees) save quite a bit of memory.
Searching through the tree is too specific to use a general function.
All the existing code just copies and slightly adapts the same 20 lines
instead, so there's no reason to keep the complicated API.
This broke the overlay blur demoe when resizing the window to a size
that would completely move the image below a button, causing the
GtkSnapshot code to remove the clip node below the blur node.
Considering the operations that some of the rendernode constructors
do, nodes with width or height 0 (or both of course) are very well
possible. This would break in the rendernodepaintable when adding a
transform, which divides by width/height of the rendernode.
We'd like the rose picture to be bigger than 16×16. Also remove the
scrolledwindow since the GtkPicture now automatically scales down the
rose image. This also fixes the picture always being allocated at y=0.
This can happen whenever the ::activate-link handler sets different
markup on the label, causing all links to be recreated. In this case,
the GtkLabelLink* passed to emit_activate_link is garbage after the
g_signal_emit call and we shouldn't try to do anything with it.
Fixes#1498
Unicode 9.0 introduced glyps for the "on" and "off" power states, in the
form of:
- U+23FD POWER ON SYMBOL, or ⏽
- U+2B58 HEAVY CIRCLE, or ⭘
With `HEAVY CIRCLE` as "power off symbol" selected to avoid adding yet
another circle to the standard.
Since we moved GtkSwitch to always show glyphs instead of (translatable)
strings, asking the localisation teams to either come up with a suitable
short string to replace the English "ON" and "OFF", or to fall back to
Unicode glyphs, we should ensure we're using the appropriate symbols to
begin with.
See also: gtk!503 for the corresponding gtk-3-24 change.
Signal emittion was added in 6f857f87dc commit and it seems that
this is only place where selected_row is set after emitting signal.
Because of this gtk_list_box_get_selected_row currently returns NULL
as selected row if selection mode is set to GTK_SELECTION_BROWSE.
Using an empty `configuration_data` object to copy a configuration file
is deprecated since Meson 0.47 (released July 2018); the equivalent
behaviour is available by using `copy: true`.
The target position is irrelevant for determining if the child should be
visible. When the current position is 0, it needs to be hidden, period.
Fixes#1355
The previous fixes made it unnecessary to hardcode IM modules for
different display types. The code now automatically skips system IM
modules for other displays.
The code would technically allow loading the xim module when X11 support
was not compiled in.
This is probably an artificial concern, because it's pretty hard to
compile XIM support without X11 support, but it makes the code clearer,
so there we go.
Context IDs are dependant on the display - both because displays can use
different backends, but also because changing the GtkSetting is a
per-display operation.
So just remove the cache.
If it turns out we need a per-display cache, we can add one to
GtkSettings.
Calling the accessibility function `grab_focus()` on a `GtkCell` under
Wayland will cause the client to crash.
This is another case of `gdk_x11_get_server_time()` being called
regardless of the actual windowing backend used.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1507
So it's able to operate properly with the DnD gesture set by
gtk_drag_source_set(). We usually just react on button release,
that's the right time to claim the gesture.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1557