gtktext: Avoid early IM reset on updates
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 6 Sep 2022 19:38:35 +0000 (21:38 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Tue, 6 Sep 2022 20:17:40 +0000 (22:17 +0200)
commit085374198fdf6a66e5cadd4dd07cca79e5243839
tree88e7a779f1c45af76ae2601b207427decf134c57
parent586675c902dd15719f474108a5c44015eb3e6d33
gtktext: Avoid early IM reset on updates

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
gtk/gtktext.c