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. https://bugzilla.gnome.org/show_bug.cgi?id=753476
This commit is contained in:
parent
3ecdfaffd2
commit
1bf27b1f18
@ -160,6 +160,7 @@ const CandidatePopup = new Lang.Class({
|
||||
Lang.bind(this, function(ps, x, y, w, h) {
|
||||
this._setDummyCursorGeometry(x, y, w, h);
|
||||
}));
|
||||
try {
|
||||
panelService.connect('set-cursor-location-relative',
|
||||
Lang.bind(this, function(ps, x, y, w, h) {
|
||||
if (!global.display.focus_window)
|
||||
@ -167,6 +168,12 @@ const CandidatePopup = new Lang.Class({
|
||||
let window = global.display.focus_window.get_compositor_private();
|
||||
this._setDummyCursorGeometry(window.x + x, window.y + y, w, h);
|
||||
}));
|
||||
} catch(e) {
|
||||
// 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.
|
||||
}
|
||||
panelService.connect('update-preedit-text',
|
||||
Lang.bind(this, function(ps, text, cursorPosition, visible) {
|
||||
this._preeditText.visible = visible;
|
||||
|
Loading…
Reference in New Issue
Block a user