[gnome-shell] ibusCandidatePopup: Handle relative cursor signal absence gracefully
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] ibusCandidatePopup: Handle relative cursor signal absence gracefully
- Date: Wed, 17 Feb 2016 17:07:29 +0000 (UTC)
commit 1bf27b1f188a01d917c1133ff1b7ee0abadf98b7
Author: Rui Matos <tiagomatos gmail com>
Date: Wed Feb 17 17:54:52 2016 +0100
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
js/ui/ibusCandidatePopup.js | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/ibusCandidatePopup.js b/js/ui/ibusCandidatePopup.js
index 5aedc86..05875a8 100644
--- a/js/ui/ibusCandidatePopup.js
+++ b/js/ui/ibusCandidatePopup.js
@@ -160,13 +160,20 @@ const CandidatePopup = new Lang.Class({
Lang.bind(this, function(ps, x, y, w, h) {
this._setDummyCursorGeometry(x, y, w, h);
}));
- panelService.connect('set-cursor-location-relative',
- Lang.bind(this, function(ps, x, y, w, h) {
- if (!global.display.focus_window)
- return;
- let window = global.display.focus_window.get_compositor_private();
- this._setDummyCursorGeometry(window.x + x, window.y + y, w, h);
- }));
+ try {
+ panelService.connect('set-cursor-location-relative',
+ Lang.bind(this, function(ps, x, y, w, h) {
+ if (!global.display.focus_window)
+ return;
+ 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]