[gnome-shell] keyboard: ignore D-Bus requests when the OSK isn't enabled



commit 6aa411fecc79c091d7db3180c628dc4cb8e38ea9
Author: Dan Winship <danw gnome org>
Date:   Tue Sep 27 14:55:38 2011 -0400

    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 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index ffcb387..2eb355f 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);
     },
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]