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)
gtk-layer-shell uses undocumented implementation details of GTK and
requires in-depth knowledge of private data structures, so GTK updates
will often result in it crashing. This Breaks should be increased
whenever that happens.
Closes: #1079292