Commit d8e179ed authored by Florian Müllner's avatar Florian Müllner
Browse files

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: <!160>
parent 8016cf7a
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment