From 6aa411fecc79c091d7db3180c628dc4cb8e38ea9 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 27 Sep 2011 14:55:38 -0400 Subject: [PATCH] keyboard: ignore D-Bus requests when the OSK isn't enabled Fixes spurious warnings about "this.actor is null" when processing org.gnome.Caribou.Keyboard messages when the keyboard isn't enabled. https://bugzilla.gnome.org/show_bug.cgi?id=659940 --- js/ui/keyboard.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index ffcb3875c..2eb355fb0 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -476,6 +476,9 @@ Keyboard.prototype = { // D-Bus methods Show: function(timestamp) { + if (!this._enableKeyboard) + return; + if (timestamp - this._timestamp < 0) return; @@ -484,6 +487,9 @@ Keyboard.prototype = { }, Hide: function(timestamp) { + if (!this._enableKeyboard) + return; + if (timestamp - this._timestamp < 0) return; @@ -492,10 +498,16 @@ Keyboard.prototype = { }, SetCursorLocation: function(x, y, w, h) { + if (!this._enableKeyboard) + return; + // this._setLocation(x, y); }, SetEntryLocation: function(x, y, w, h) { + if (!this._enableKeyboard) + return; + // this._setLocation(x, y); },