[gnome-shell] layout: Reset the OSK to the primary monitor when monitors change



commit 01eb79a3ccc4a6a62a6712e93a976012b9f1fde2
Author: Rui Matos <tiagomatos gmail com>
Date:   Mon Oct 13 17:43:39 2014 +0200

    layout: Reset the OSK to the primary monitor when monitors change
    
    When monitors change, the previous index might not mean the same
    physical monitor anymore, in fact, it might become invalid. In the
    latter case, we'll actually get a JS error when accessing
    this.keyboardMonitor in _updateKeyboardBox() . To avoid this, let's
    just always reset the OSK to the primary monitor.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=738536

 js/ui/layout.js |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index c61376d..dda9fc7 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -423,10 +423,7 @@ const LayoutManager = new Lang.Class({
         this.panelBox.set_position(this.primaryMonitor.x, this.primaryMonitor.y);
         this.panelBox.set_size(this.primaryMonitor.width, -1);
 
-        if (this.keyboardIndex < 0)
-            this.keyboardIndex = this.primaryIndex;
-        else
-            this._updateKeyboardBox();
+        this.keyboardIndex = this.primaryIndex;
 
         this.trayBox.set_position(this.bottomMonitor.x,
                                   this.bottomMonitor.y + this.bottomMonitor.height);


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