IBus candidate window can be placed off screen with GTK4 in GNOME Xorg
Affected version
- GNOME Xorg 42
- GTK 4.6
- IBus and the GTK4 module 1.5.26 (/usr/lib*/gtk-4.0/4.0.0/immodules/libim-ibus.so)
Bug summary
GTK4 no longer provide the focused widget position and IBus GTK4 module get the window position with XTranslateCoordinates() and set gnome-shell/js/ui/ibusCandidatePopup.js:IbusCandidatePopup receives the cursor position with the signal of 'set-cursor-location' from IBusPanelService but the position is the window position in GNOME Xorg.
And IbusCandidatePopup can be placed off the screen easily because the popup size is a little big at the cursor position.
Steps to reproduce
- Log into GNOME Xorg
- Configure ibus-anthy or ibus-libpinyin with
gnome-control-center keyboard
and activate the input source. - Run gtk4-demo-application and focus in the text entry
- Type "a" x space key x space key with ibus-anthy Hiaragana mode or some keys with ibus-libpinyin
What happened
The candidate window can be placed off the screen.
What did you expect to happen
The candidate window is always put with the screen.