GNOME Bugzilla – Bug 753476
[Wayland] IBus candidate popup displayed in the corner
Last modified: 2016-02-17 17:09:13 UTC
When running GNOME Shell under Wayland, the IBus candidate popup doesn't get displayed under the cursor, it gets displayed close to the top corner of the screen. However, when inputting, you can clearly see the popup moving as you type, as if it were following the cursor. This is with gnome-shell-3.16.3-1.fc22.x86_64
Created attachment 309015 [details] [review] A work in progress patch Daiki just passed me this untested patch from Rui: http://du-a.org/~ueno/ibus-relative-cursor-location/gnome-shell.patch It requires another patch to be applied to IBus: http://du-a.org/~ueno/ibus-relative-cursor-location/0001-set-cursor-location-relative.patch So I tried rebuilding GNOME Shell and IBus with those patches applied, but things still didn't work right. I modified the GNOME Shell patch a bit, which is what I'm attaching here. With this patch attached, then the IBus popup candidate isn't displayed in the corner of the screen any more... it's displayed in the corner of the window. So that's a bit better, but it's still not good. :(
Created attachment 321006 [details] [review] ibusCandidatePopup: Add support for relative cursor positioning IBus now provides a new method for cursor positioning where the coordinates are relative to the focused window. This is useful for wayland clients which don't have access to their global coordinates. -- The gnome-shell patch is fine. We still have to support the global coordinates method of setting the cursor position. It wasn't working for you because the IBus patch wasn't complete. Adding this fix on top: https://github.com/rtcm/ibus/commit/bb9f34d44ecf1a4b4dfe383d1a08969764197c11 makes it work. I've asked the IBus maintainers to include those patches and if they're ok with this, I'll then push the shell patch.
Pushing this as the IBus patch seems to be going in soon[1] and doesn't have any ill effects if the IBus support isn't there. [1] https://codereview.appspot.com/290780043/ Attachment 321006 [details] pushed as a13357c - ibusCandidatePopup: Add support for relative cursor positioning
(In reply to Rui Matos from comment #3) > Pushing this as the IBus patch seems to be going in soon[1] and > doesn't have any ill effects if the IBus support isn't there. > > [1] https://codereview.appspot.com/290780043/ > > Attachment 321006 [details] pushed as a13357c - ibusCandidatePopup: Add > support for relative cursor positioning After apply the patch, I cannot switch input methods and there is no input method indicator in the top bar. gnome-shell shows the following messages: (gnome-shell:99556): Gjs-WARNING **: JS ERROR: Error: No signal 'set-cursor-location-relative' on object 'IBusPanelService' CandidatePopup<.setPanelService@resource:///org/gnome/shell/ui/ibusCandidatePopup.js:164 wrapper@resource:///org/gnome/gjs/modules/lang.js:178 IBusManager<._initPanelService@resource:///org/gnome/shell/misc/ibusManager.js:122 wrapper@resource:///org/gnome/gjs/modules/lang.js:178 Do we have to keep compatibility with old versions of ibus, or update jhbuild modulesets and require the latest version?
(In reply to Ting-Wei Lan from comment #4) > After apply the patch, I cannot switch input methods and there is no input > method indicator in the top bar. gnome-shell shows the following messages: > > (gnome-shell:99556): Gjs-WARNING **: JS ERROR: Error: No signal Sorry, I forgot that if the signal doesn't exist we get a JS exception which breaks the whole initialization. > Do we have to keep compatibility with old versions of ibus, or update > jhbuild modulesets and require the latest version? I think adding a version requirement for this won't work because there's no IBus release with the signal yet and the signal isn't even used unless on wayland sessions. I think just ignoring the error is ok here.
Created attachment 321512 [details] [review] ibusCandidatePopup: Handle relative cursor signal absence gracefully Only recent IBus versions have support for this signal which is used for wayland clients. In order to work with older IBus versions we can silently ignore the signal's absence.
Attachment 321512 [details] pushed as 1bf27b1 - ibusCandidatePopup: Handle relative cursor signal absence gracefully