After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 753476 - [Wayland] IBus candidate popup displayed in the corner
[Wayland] IBus candidate popup displayed in the corner
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2015-08-10 15:28 UTC by Mathieu Bridon
Modified: 2016-02-17 17:09 UTC
See Also:
GNOME target: 3.20
GNOME version: ---


Attachments
A work in progress patch (1.99 KB, patch)
2015-08-10 15:31 UTC, Mathieu Bridon
none Details | Review
ibusCandidatePopup: Add support for relative cursor positioning (2.40 KB, patch)
2016-02-12 16:44 UTC, Rui Matos
committed Details | Review
ibusCandidatePopup: Handle relative cursor signal absence gracefully (2.44 KB, patch)
2016-02-17 17:02 UTC, Rui Matos
committed Details | Review

Description Mathieu Bridon 2015-08-10 15:28:18 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
Comment 1 Mathieu Bridon 2015-08-10 15:31:56 UTC
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. :(
Comment 2 Rui Matos 2016-02-12 16:44:39 UTC
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.
Comment 3 Rui Matos 2016-02-15 17:15:41 UTC
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
Comment 4 Ting-Wei Lan 2016-02-17 06:48:41 UTC
(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?
Comment 5 Rui Matos 2016-02-17 17:02:21 UTC
(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.
Comment 6 Rui Matos 2016-02-17 17:02:48 UTC
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.
Comment 7 Rui Matos 2016-02-17 17:09:08 UTC
Attachment 321512 [details] pushed as 1bf27b1 - ibusCandidatePopup: Handle relative cursor signal absence gracefully