[gnome-shell] keyboard: Allow closing immediately
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] keyboard: Allow closing immediately
- Date: Sat, 13 Mar 2021 18:33:41 +0000 (UTC)
commit 2cf8b93a7b0da5280f26223ccd52388388f46491
Author: Jonas Dreßler <verdre v0yd nl>
Date: Sat Feb 20 12:35:06 2021 +0100
keyboard: Allow closing immediately
Just like opening the OSK, make it possible to close it immediately,
we'll make use of this in the next commit.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1760>
js/ui/keyboard.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index 023b0484f4..22ebb32659 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -1798,7 +1798,7 @@ var Keyboard = GObject.registerClass({
this._setEmojiActive(false);
}
- close() {
+ close(immediate = false) {
this._clearShowIdle();
this._keyboardRequested = false;
@@ -1806,6 +1806,12 @@ var Keyboard = GObject.registerClass({
return;
this._clearKeyboardRestTimer();
+
+ if (immediate) {
+ this._close();
+ return;
+ }
+
this._keyboardRestingId = GLib.timeout_add(GLib.PRIORITY_DEFAULT,
KEYBOARD_REST_TIME,
() => {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]