That mode of operation requires an exclude rectangle, which maps better to the info provided on gtk_im_context_set_cursor_location(), coincidentally also fixes the offset seen on the IME preedit window. https://gitlab.gnome.org/GNOME/gtk/-/issues/374 https://bugzilla.gnome.org/show_bug.cgi?id=663096