From d917661ce83655478e2de7d3f23b1692ac118468 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Sat, 27 Jan 2024 14:25:03 +0100 Subject: [PATCH] keyboard: Close keyboard immediately on user interaction When the user presses the hide button, the rest timeout feels like lag in that case. Avoid it in that case. Part-of: --- js/ui/keyboard.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index b70830ad7..4ce21976c 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -1297,7 +1297,7 @@ export const Keyboard = GObject.registerClass({ this._emojiSelection = new EmojiSelection(); this._emojiSelection.connect('toggle', this._toggleEmoji.bind(this)); - this._emojiSelection.connect('close-request', () => this.close()); + this._emojiSelection.connect('close-request', () => this.close(true)); this._emojiSelection.connect('emoji-selected', (selection, emoji) => { this._keyboardController.commitString(emoji); }); @@ -1449,7 +1449,7 @@ export const Keyboard = GObject.registerClass({ if (key.action !== null) { button.connect('released', () => { if (key.action === 'hide') { - this.close(); + this.close(true); } else if (key.action === 'languageMenu') { this._popupLanguageMenu(button); } else if (key.action === 'emoji') {