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)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 21 Apr 2022 23:24:00 +0000 (19:24 -0400)
commit812c8926ecf1722ab8a1570a26588263c80c6a4b
treed4fcffe5666e1f5a52af2174305f89110b47fd42
parentb14bc4749ed260577cd5c71abd7c5c41b56ccc2f
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