The colorbutton contains a button which contains a colorswatch.
We want the focus to go straight to the button, nowhere else,
so mark the swatch as !can-focus.
Adapt tests to match.
In the paths where len > MAX_LEN and cursor/anchor are separated by
at least MAX_LEN from text edges, we were clamping the right end of
the surrounding string at MAX_LEN. Oops.
This end anchor may go as far as the string length, although just
up to len - MAX_LEN in real terms (due to the condition above that
caches cursor/anchor positions being near enough the text end).
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2565
(cherry-picked from commit d7fb15c822)
Entries and menubuttons are no longer focusable themselves,
they have focusable children. Since we don't have accessible
objects for those, transfer the focus-related state (focusable
and focused) from the children to the main accessible object.
We don't get a focus-out on the event controller, when
the surface is losing keyboard focus, since we are not
moving our focus to some other widget, so we are never
unsetting the mnemonics-visible property. Do that in
response to surface state changes instead.
We are not loading the Compose file for individual contexts,
it just gets added to a global list. So don't pass an im context
along. This will let us move the loading out of the initialization
of individual contexts, and only do it once.
We were not properly setting the new_descendent field
in Crossing structs for GTK_CROSSING_OUT events. This
was causing extraneous ::leave signals to be emitted,
and make model buttons in popover menus flicker when
hovered.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2536
Under grabbing circumstances we used to get several crossing events,
some corresponding to the grab itself and some corresponding to
pointer motion.
The backends now do a better job at keeping those simple, which
means we sit listening for events that don't actually arrive. This
triggers pointer focus issues when dragging windows or opening
grabbing popups.
Actually obey those events, they will be the only ones we get now.
When no printer has been selected (e.g. because we don't
find any printers), the 'print at' radio group should be
insensitive, except for the 'now' choice. Selecting another
option in this situation will lead to a crash.
When we stopped translating event coordinates in-place,
this function inadvertently started returning surface-relative
bounding boxes instead of widget-relative ones, as expected.
Fix this by using the widget-relative coordinates that we
already store.
We no longer translate event coordinates in-place,
so gdk_event_get_position() returns surface-relative
coordinates, not widget-relative ones. Just use the
coordinates we are given.