[gnome-shell/wip/carlosg/osk-gesture-feedback: 28/31] keyboard: Move monitor management to KeyboardController
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/carlosg/osk-gesture-feedback: 28/31] keyboard: Move monitor management to KeyboardController
- Date: Tue, 16 Feb 2021 13:49:20 +0000 (UTC)
commit c377ef6595a3e34ed649baaf37d82eac4d6233ea
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Feb 11 16:44:28 2021 +0100
keyboard: Move monitor management to KeyboardController
Instead of setting it deep down, manage it at the higher level.
js/ui/keyboard.js | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index 4f5bd25db9..a5304edace 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -1194,8 +1194,10 @@ var KeyboardManager = class KeyBoardManager {
}
open(monitor) {
+ Main.layoutManager.keyboardIndex = monitor;
+
if (this._keyboard)
- this._keyboard.open(monitor);
+ this._keyboard.open();
}
close() {
@@ -1723,15 +1725,12 @@ var Keyboard = GObject.registerClass({
this._keyboardRestingId = 0;
}
- open(monitor) {
+ open() {
this._clearShowIdle();
this._keyboardRequested = true;
if (this._keyboardVisible) {
- if (monitor != Main.layoutManager.keyboardIndex) {
- Main.layoutManager.keyboardIndex = monitor;
- this._relayout();
- }
+ this._relayout();
return;
}
@@ -1740,17 +1739,16 @@ var Keyboard = GObject.registerClass({
KEYBOARD_REST_TIME,
() => {
this._clearKeyboardRestTimer();
- this._open(monitor);
+ this._open();
return GLib.SOURCE_REMOVE;
});
GLib.Source.set_name_by_id(this._keyboardRestingId, '[gnome-shell] this._clearKeyboardRestTimer');
}
- _open(monitor) {
+ _open() {
if (!this._keyboardRequested)
return;
- Main.layoutManager.keyboardIndex = monitor;
this._relayout();
this.animateShow();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]