Gridview fix rubberbanding issues
Closes#3462 and #3445
See merge request GNOME/gtk!4688
(cherry picked from commit 0c052c9a37)
2bcae546 gridview: Move gtk_grid_view_computer_total_height() up for reuse
c6f357e4 gridview: Limit rectangle to gridview columns
1e9a36ff gridview: Allow starting rubberband in empty space below last row
ba909cf9 gridview: Fix get_items_in_rect() selection
f3fc8f5b gridview: Return an empty bitset when selecting only empty space
57c032e6 listbase: Clear selection if rubberband selected an empty set
aba2d994 gridview: Fix typo in docstring for gtk_grid_view_get_cell_at_y()
e14b84ff listview: Return an empty bitset when selecting only empty space
d6fab140 listview: Allow starting rubberband in empty space below last row
a7bbc258 listview: Fix selection for last item in get_items_in_rect
We haven't had any scalable directories in this list.
Add some. Since we seem to have settled on including
just actions and status as subdirectories for each
size, add scalable/actions and scalable/status.
Fixes: #4960
Use a separate queue to dispatch the token object exclusively, just like we
do on the GdkSurface activation paths.
(cherry-picked from commit fb68600d88)
This brings back a subset of what quit-mnemonic.ui tested for, but
trying a lot harder to trigger the label overdrawing its allocation,
which will cause the text to be cut off when clipping is happening.
It should not be an issue at all with GTK4, but keeping that test around
is a good idea.
I can't quite figure out what this test was meant
to test, and how to make it do so in a way that
does not fall afoul of rendering issues in the GL
renderer and rounding differences in pango.
Can't win with reftests.
When loading cursors at scale, we expect the
cursor images to have a size of scale * size.
If we don't find such images, load them at their
unscaled size and scale them up ourselves.
Without this, cursors will appear in unexpected
sizes depending on scales and themes.
Related: #4746
If a context is not realized, calling gtk_at_spi_context_to_ref() will
return a null ref, because its path has not been initialized yet. This
was already done for all other cases in get_parent_context_ref(), but
was missing for the GtkStackPage case.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4944
It appears that we mess up accounting for blinking
cursors sometimes, and can hit blink_cb when there
is a nonempty selection.
Instead of asserting, warn and stop blinking.
Related: #4767
On Wayland it is a protocol violation to upload buffers with
dimensions that are not an integer multiple of the buffer scale.
Until recently, Mutter did not enforce this. When it started
doing so, some users started seeing crashes in GTK apps because the
cursor theme ended up with e.g. a 15x16 pixel image at scale of 2.
Add a small sanity check for this case.
Not updating shadow size unconditionally would lead to shadow size not
being set on map, which would lead mutter to think that we are a Window
without extents and then become confused when we suddenly set some.
Make sure that doesn't happen by always having shadows set on map, just
like GTK3.
Fixes#4136
(cherry picked from commit 213490099b)