[gnome-shell-extensions/window-list: 4/13] Handle OSK
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions/window-list: 4/13] Handle OSK
- Date: Fri, 25 Jan 2013 14:25:13 +0000 (UTC)
commit 41890e289678b6ad6c22d0dfc4c9375292502224
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 2ebd9ed..22b69a0 100644
--- a/extensions/window-list/extension.js
+++ b/extensions/window-list/extension.js
@@ -169,6 +169,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));
@@ -177,11 +186,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);
@@ -195,6 +206,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 });
@@ -231,6 +250,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]