When some of the Emoji have been filtered out by
a search term, arrow keynav would behave oddly and
get stuck in invisible sections. Fix this by ignoring
any filtered out children when moving between
sections for arrow keynav.
Fixes: #5076
Test that we can expand and collapse a row, and then
add another child below it, without crashing.
Adapted from the testcase in #4595.
This tests the fix in the previous commit.
When we collapse a node, we clear out the children,
but we were not disconnecting the signal handler on
the child listmodel, leading to bad outcomes when
that model is persistent and changing.
Fixes: #4595
Commit adba0b97 fixed missed pointer crossings by using a helper function that
was already present and looked like did everything that was needed. However
this function was oriented to keyboard focus and it also did update the related
widget state. Doing these changes on pointer-based crossing was misuse, and
could cause weird interactions with keyboard focus management.
Fix this by using gtkmain.c gtk_synthesize_crossing_event() that is in fact
oriented to pointers.
Fixes: adba0b97 (gtkwindow: Synthesize pointer crossing events on state changes)
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5094
The inner loop in gtk_paned_set_focus_child() tries to find the
topmost GtkPaned, however, if the `w` variable ends up becoming
NULL after bubbling up the entire GtkWidget hierarchy, this loop
never breaks.
Check for NULL in this loop.
Closes https://gitlab.gnome.org/GNOME/gtk/-/issues/5094
Instead of passing an event and figuring out coordinates from it, pass
directly the toplevel coordinates so that we can use this outside event
handling.
All callers have been updated to pass the coordinates, in practical effects
they were already based on the GtkNative.
When widgets go mapped/unmapped, we repick but don't generate crossing
events. Since there could be stateful controllers that use those in
the previously picked widget (e.g. GtkEventControllerMotion), skipping
those breaks their state.
Ensure to send the relevant crossing events on every situation that
changes the pointer focus, so these controllers get a fair opportunity
to undo their state.
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2877
When the IM commands the GtkText to delete text, the cursor position
would change, and so would the surrounding text. Reset the IM context
so that these updates are properly picked up by the IM.
Fixes backspace key behavior in the GNOME Shell OSK, since that relies
on the surrounding text being properly updated for the next iteration.
When the IM commands the GtkText to delete text, the cursor position
would change, and so would the surrounding text. Reset the IM context
so that these updates are properly picked up by the IM.
Fixes backspace key behavior in the GNOME Shell OSK, since that relies
on the surrounding text being properly updated for the next iteration.
Resetting the IM on IM updates is too eager and indeed the simple
IM context doesn't like that this happens in the middle of dead
key handling.
We however want to reset the IM after actual text buffer changes
(say, a committed string) moved the cursor position, altered the
surrounding text, etc. So that the IM implementation does know to
update its state.
Since there is going to be an actual IM reset anyways, it does
no longer make sense to try to preserve the old priv->need_im_reset
status during commit handling.
Fixes: 52ac71b972 ("gtktextview: Shuffle the places doing IM reset")
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5133
Resetting the IM on IM updates is too eager and indeed the simple
IM context doesn't like that this happens in the middle of dead
key handling.
We however want to reset the IM after actual text buffer changes
(say, a committed string) moved the cursor position, altered the
surrounding text, etc. So that the IM implementation does know to
update its state.
Fixes: 9e29739e66 ("gtktext: Shuffle the places doing IM reset")
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5133
We want to claim the event sequence in the click gesture when appropriate,
such as activating a row or clicking an editable cell, but this is currently
done too early, preventing other gestures for drag-and-drop and rubberband
selection entirely.
Fixes#3649Fixes#3985Fixes#4669
When reordering notebook tabs, updating the sensitivity state of the
arrow buttons is necessary if the tab is moved to the beginning or
end of the tab list.
When notebook tabs are reorderable, pressing the notebook arrow buttons to
change the active tab results in tabs reordering unexpectedly.
Claim the event sequence after pressing an arrow button to avoid conflicts
with the motion/drag gesture used for reordering.
A typo resulted in the tab container widget being retrieved instead of
the tab widget. If an adjacent action widget was present, an infinite
loop occurred when switching tabs while a screen reader was enabled.
We were disabling the insert-emoji action when the
no-emoji input hint is set, but the Ctrl-. shortcut
was bypassing the action and kept working. Make
the shortcut activate the action instead.
Fixes: #5123
Currently, the wayland IM context sends zwp_text_input_v3.commit from
a number of places, and some of them with partial data. In order to
make client state updates "atomic" and complete, make the communication
happen over an unified notify_im_change() function that happens on
a narrower set of circumstances:
- The GtkIMContext is reset
- The GtkIMContext is just focused
- The gesture to invoke the OSK is triggered
- The IM context is reacting to changes coming from the compositor
Notably, setting the cursor location or the surrounding text do not try
to commit state on their own, and now will be flushed with the corresponding
IM update or reset. But also, these requests won't be prevented from
happening individually on serial mismatch, instead it will be the whole
state commit which is held off.
With these changes in place, all client-side updates are notified
atomically to the compositor under a single .commit request.
(cherry-picked from commit f66ffde68d)
During text widget manipulation (inserting or deleting text via keyboard)
the IM context is reset somewhat early, before the actual change took place.
This makes IM lag behind in terms of surrounding text and cursor position.
Shuffle these IM reset calls so that they happen after the changes, and
ensure that the IM is actually reset, since that is currently toggled on
a pretty narrow set of circumstances.
Also, fix a bug during GtkEventControllerKey::im-update where the condition
on cursor position editability to reset the IM context was inverted.
(cherry-picked from commit 52ac71b972)
During text widget manipulation (inserting or deleting text via keyboard)
the IM context is reset somewhat early, before the actual change took place.
This makes IM lag behind in terms of surrounding text and cursor position.
Shuffle these IM reset calls so that they happen after the changes, and
ensure that the IM is actually reset, since that is currently toggled on
a pretty narrow set of circumstances.
(cherry-picked from commit 9e29739e66)
gtk_tree_view_top_row_to_dy, which is called from GtkTreeView's
size_allocate function, changes the adjustment value. Since this
conflicts with the animation when changing the active row, bail
out until the animation is finished.
Fixes#4550
When a GtkTreeView scrolled horizontally, it was not possible to
select rows outside the initial area due to an erroneous comparison
between widget and bin window coordinates.
Original change to widget coordinates occurred in commit
a0de570e47