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,13 +160,20 @@ const CandidatePopup = new Lang.Class({
|
|||||||
Lang.bind(this, function(ps, x, y, w, h) {
|
Lang.bind(this, function(ps, x, y, w, h) {
|
||||||
this._setDummyCursorGeometry(x, y, w, h);
|
this._setDummyCursorGeometry(x, y, w, h);
|
||||||
}));
|
}));
|
||||||
panelService.connect('set-cursor-location-relative',
|
try {
|
||||||
Lang.bind(this, function(ps, x, y, w, h) {
|
panelService.connect('set-cursor-location-relative',
|
||||||
if (!global.display.focus_window)
|
Lang.bind(this, function(ps, x, y, w, h) {
|
||||||
return;
|
if (!global.display.focus_window)
|
||||||
let window = global.display.focus_window.get_compositor_private();
|
return;
|
||||||
this._setDummyCursorGeometry(window.x + x, window.y + y, w, h);
|
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',
|
panelService.connect('update-preedit-text',
|
||||||
Lang.bind(this, function(ps, text, cursorPosition, visible) {
|
Lang.bind(this, function(ps, text, cursorPosition, visible) {
|
||||||
this._preeditText.visible = visible;
|
this._preeditText.visible = visible;
|
||||||
|
Loading…
Reference in New Issue
Block a user