If we don't keep a reference on it, it is released somewhere before
gtk_drag_abort_timeout is called. This can cause a crash e.g. when the
dnd takes place in the GtkSocket/GtkPlug framework.
Fixes: #7128
problem:
After switching screens using a KVM switch, there is a probability
that the application interface will become unresponsive to clicks.
analysis:
The valid size range supported by the Cairo surface is [0,32767].
If the width and height exceed this range, the surface's status is set
to CAIRO_STATUS_INVALID_SIZE, indicating an invalid size exception.
In this exception state, Cairo does not have a clipping region.
When determining whether the window needs to be drawn,
the function gdk_cairo_get_clip_rectangle() is used to check
if the cairo_t has a clipping region. If there is none, the window
and its child windows will not be drawn (i.e., the draw signal will not be emitted).
If an error occurs in the X server and a value exceeding Cairo's
valid size is provided in the ConfigureNotify, it will result in
the window and its child windows not being drawn.
Therefore, we will add range checks here to avoid this special situation.
We should skip going through the look up table if the cursor name is
"none", i.e. when g_str_equal() returns true or 1.
(cherry picked from commit 7ee2e50dc4f0898f7d56d67017c36414618f2e82)
Upstream found this enum value objectionable,
despite being a perfectly good CSS cursor.
(cherry picked from commit eda5bd5242a9b04ed5c1e9f43592c7fc9d8dca4a)
If present, use the cursor-shape protocol instead of manually
updating a pointer surface. This commit supports both v1 of the
protocol and the (still unmerged) v2 additions to the enumeration.
This was tested with both kwin and mutter.
(cherry picked from commit a63d6d1dc7a8ebdf61c682196f89917846cbe8ac)
Add all-resize to the list of names that we want to guarantee.
We use move as the fallback for it. The idea is that all-resize
will be visually compatible with resize cursors, and move will
be visually compatible with dnd cursors. And it is nice to
have two distinct names, so the metaphors can be changed without
clashing.
(cherry picked from commit 79ba34f1aa82de7d06c19109582f7df5f144a6c1)
GtkBuilder uses GMarkup, which defines a boolean attribute as:
- yes/no
- true/false
- 1/0
The current ITS file used by xgettext to extract translatable strings
from GtkBuilder UI files only covers the first value.
See: 9e83eb65017cb38b809c733535195507bd442bd8
See: #4596
Tablets require a tool in proximity to have an active surface
to send pointer events to. Avoid the grab-induced crossing events
on tablets that don't have a tool in proximity at the time of
creating the grab.
Fixes#1188, Fixes#3116
(cherry picked from commit d8919311b18bb0b89121c88405f757d6cee2e7cb)
Add a Ctrl+Shift+T shortcut to toggle the widgets direction,
to give the user control in the rare cases where a different
direction is appropriate.
This is a backport of 0b33abe44b4f42cba (without the context
menu item, since that needs new strings).
Now that we are no longer relying on keyboard direction to
determine the direction of empty entries, there's no need
for a direction-changed signal handler.
Instead of trying to derive a direction from content and
keyboard layout, just let the widgets direction prevail.
This avoids irritating jumping text on focus in, in situations
where the directions are mixed.
See discussion in !7971
This is a backport of d0bfed5195be99c21e.
The new default GNOME font already does the right thing for
colon in numeric context, and this replacement can show up
as a missing glyph on other platforms. So, just rely on
smart fonts, going forward.
Fixes: #7279
(cherry picked from commit e4d919a2df73f0fe5ccb1657fed97ce5673aa542)
See crash reliably reproduced on GIMP when a popup is destroyed on a
drag-begin callback and Wayland data listener callbacks calls the
enter() callback with a NULL surface.
Cf. https://gitlab.gnome.org/GNOME/gimp/-/issues/10515