imwayland: Do not defer commit() after set_surrounding_text()
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 6 Apr 2022 11:08:00 +0000 (13:08 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 6 Apr 2022 11:52:05 +0000 (13:52 +0200)
commiteb7c78aa4896b1d36fa09a3e68c942730b233f74
tree40bcc2e05711b1d6c8a77b060524243e2224cdc9
parent7ab39b546120eb2b605f3918aaee4face6291c76
imwayland: Do not defer commit() after set_surrounding_text()

For reasons that only apply to the old serial handling, asking for
the surrounding after IM changes resulted in lazy handling of
commit() afterwards.

With the recent interpretation of serials, this problem became more
apparent, since it is in fact very likely that the last interaction
step after an IM change is notifying of the changed surrounding
text after the IM change was applied.

Make handling of surrounding text similar to caret position changes,
always commit() after the state change, but skip through non-changes.

This makes the compositor state fully up-to-date after an IM change.
gtk/gtkimcontextwayland.c