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>
This commit is contained in:
parent
95b83575cb
commit
2cf8b93a7b
@ -1798,7 +1798,7 @@ var Keyboard = GObject.registerClass({
|
|||||||
this._setEmojiActive(false);
|
this._setEmojiActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
close() {
|
close(immediate = false) {
|
||||||
this._clearShowIdle();
|
this._clearShowIdle();
|
||||||
this._keyboardRequested = false;
|
this._keyboardRequested = false;
|
||||||
|
|
||||||
@ -1806,6 +1806,12 @@ var Keyboard = GObject.registerClass({
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
this._clearKeyboardRestTimer();
|
this._clearKeyboardRestTimer();
|
||||||
|
|
||||||
|
if (immediate) {
|
||||||
|
this._close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this._keyboardRestingId = GLib.timeout_add(GLib.PRIORITY_DEFAULT,
|
this._keyboardRestingId = GLib.timeout_add(GLib.PRIORITY_DEFAULT,
|
||||||
KEYBOARD_REST_TIME,
|
KEYBOARD_REST_TIME,
|
||||||
() => {
|
() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user