[gnome-shell-extensions] window-list: Adjust to OSK changes
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] window-list: Adjust to OSK changes
- Date: Wed, 24 Feb 2021 00:33:32 +0000 (UTC)
commit d8e179ed09d1e8168980b5a6f61481043281d526
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Feb 23 00:58:31 2021 +0100
window-list: Adjust to OSK changes
Visibility changes are now handled internally, without an easy way
for us to hook into. We can resort to a hack though, as the gesture
action to bring up the keyboard is only enabled while the keyboard
is hidden.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/160>
extensions/window-list/extension.js | 33 +++++++++++++++------------------
1 file changed, 15 insertions(+), 18 deletions(-)
---
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
index a7a7a5e..acb5c63 100644
--- a/extensions/window-list/extension.js
+++ b/extensions/window-list/extension.js
@@ -744,21 +744,20 @@ class WindowList extends St.Widget {
this._appStateChangedId = this._appSystem.connect(
'app-state-changed', this._onAppStateChanged.bind(this));
- this._keyboardVisiblechangedId = Main.layoutManager.connect(
- 'keyboard-visible-changed',
- (o, state) => {
- Main.layoutManager.keyboardBox.visible = state;
- let { keyboardBox } = Main.layoutManager;
- keyboardBox.visible = state;
- if (state) {
- Main.uiGroup.set_child_above_sibling(
- this, keyboardBox);
- } else {
- Main.uiGroup.set_child_above_sibling(
- this, Main.layoutManager.panelBox);
- }
- this._updateKeyboardAnchor();
- });
+ // Hack: OSK gesture is tied to visibility, piggy-back on that
+ this._keyboardVisiblechangedId =
+ Main.keyboard._bottomDragAction.connect('notify::enabled',
+ action => {
+ const visible = !action.enabled;
+ if (visible) {
+ Main.uiGroup.set_child_above_sibling(
+ this, Main.layoutManager.keyboardBox);
+ } else {
+ Main.uiGroup.set_child_above_sibling(
+ this, Main.layoutManager.panelBox);
+ }
+ this._updateKeyboardAnchor();
+ });
let workspaceManager = global.workspace_manager;
@@ -1076,11 +1075,9 @@ class WindowList extends St.Widget {
this._appSystem.disconnect(this._appStateChangedId);
this._appStateChangedId = 0;
- Main.layoutManager.disconnect(this._keyboardVisiblechangedId);
+ Main.keyboard._bottomDragAction.disconnect(this._keyboardVisiblechangedId);
this._keyboardVisiblechangedId = 0;
- Main.layoutManager.hideKeyboard();
-
this._disconnectWorkspaceSignals();
global.workspace_manager.disconnect(this._nWorkspacesChangedId);
this._nWorkspacesChangedId = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]