keyboard: Clear keyboard rest timer when opening immediately

When immediate is true on open(), we want to show the OSK immediately,
it also makes sense to cleanup the keyboard rest timer in that case.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1728>
This commit is contained in:
Jonas Dreßler 2021-02-20 12:33:29 +01:00 committed by Marge Bot
parent cb68bbee36
commit f3f0396b7e

View File

@ -1743,12 +1743,13 @@ var Keyboard = GObject.registerClass({
return; return;
} }
this._clearKeyboardRestTimer();
if (immediate) { if (immediate) {
this._open(); this._open();
return; return;
} }
this._clearKeyboardRestTimer();
this._keyboardRestingId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, this._keyboardRestingId = GLib.timeout_add(GLib.PRIORITY_DEFAULT,
KEYBOARD_REST_TIME, KEYBOARD_REST_TIME,
() => { () => {