[gnome-shell-extensions/wip/window-list: 4/13] Handle OSK



commit 4e9478e855251f727387b7d6b2f493ba04f35d30
Author: Florian MÃllner <fmuellner gnome org>
Date:   Thu Jan 17 18:00:22 2013 +0100

    Handle OSK

 extensions/window-list/extension.js |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
index 02964c0..762a2b1 100644
--- a/extensions/window-list/extension.js
+++ b/extensions/window-list/extension.js
@@ -161,6 +161,15 @@ const WindowList = new Lang.Class({
                                        Lang.bind(this, this._updatePosition));
         this._updatePosition();
 
+        this._keyboardVisiblechangedId =
+            Main.layoutManager.connect('keyboard-visible-changed',
+                Lang.bind(this, function(o, state) {
+                    Main.layoutManager.keyboardBox.visible = state;
+                    Main.uiGroup.set_child_above_sibling(windowList.actor,
+                                                         Main.layoutManager.keyboardBox);
+                    this._updateKeyboardAnchor();
+                }));
+
         this._nWorkspacesChangedId =
             global.screen.connect('notify::n-workspaces',
                                   Lang.bind(this, this._onWorkspacesChanged));
@@ -169,11 +178,13 @@ const WindowList = new Lang.Class({
         this._overviewShowingId =
             Main.overview.connect('showing', Lang.bind(this, function() {
                 this.actor.hide();
+                this._updateKeyboardAnchor();
             }));
 
         this._overviewHidingId =
             Main.overview.connect('hiding', Lang.bind(this, function() {
                 this.actor.show();
+                this._updateKeyboardAnchor();
             }));
 
         let windows = Meta.get_window_actors(global.screen);
@@ -187,6 +198,14 @@ const WindowList = new Lang.Class({
         this.actor.set_position(monitor.x, monitor.y + monitor.height - this.actor.height);
     },
 
+    _updateKeyboardAnchor: function() {
+        if (!Main.keyboard.actor)
+            return;
+
+        let anchorY = Main.overview.visible ? 0 : this.actor.height;
+        Main.keyboard.actor.anchor_y = anchorY;
+    },
+
     _onWindowAdded: function(ws, win) {
         let button = new WindowButton(win);
         this._windowList.add(button.actor, { y_fill: true });
@@ -223,6 +242,12 @@ const WindowList = new Lang.Class({
         Main.layoutManager.disconnect(this._monitorsChangedId);
         this._monitorsChangedId = 0;
 
+        Main.layoutManager.disconnect(this._keyboardVisiblechangedId);
+        this._keyboardVisiblechangedId = 0;
+
+        if (Main.keyboard.actor)
+            Main.keyboard.actor.anchor_y = 0;
+
         global.screen.disconnect(this._nWorkspacesChangedId);
         this._nWorkspacesChangedId = 0;
 



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