keyboard: Replace oskCompletion
setter with public method
The underlying value only changes asynchronously, which makes a setter a bit awkward, so replace it with a public async function. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3439>
This commit is contained in:
parent
2975afaf1d
commit
961ca226bd
@ -1259,7 +1259,7 @@ export const Keyboard = GObject.registerClass({
|
|||||||
|
|
||||||
this._clearShowIdle();
|
this._clearShowIdle();
|
||||||
|
|
||||||
this._keyboardController.oskCompletion = false;
|
this._keyboardController.setOskCompletion(false);
|
||||||
this._keyboardController.destroy();
|
this._keyboardController.destroy();
|
||||||
|
|
||||||
Main.layoutManager.untrackChrome(this);
|
Main.layoutManager.untrackChrome(this);
|
||||||
@ -1723,7 +1723,7 @@ export const Keyboard = GObject.registerClass({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._keyboardController.oskCompletion = true;
|
this._keyboardController.setOskCompletion(true);
|
||||||
this._clearKeyboardRestTimer();
|
this._clearKeyboardRestTimer();
|
||||||
|
|
||||||
if (immediate) {
|
if (immediate) {
|
||||||
@ -1758,7 +1758,7 @@ export const Keyboard = GObject.registerClass({
|
|||||||
if (!this._keyboardVisible)
|
if (!this._keyboardVisible)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._keyboardController.oskCompletion = false;
|
this._keyboardController.setOskCompletion(false);
|
||||||
this._clearKeyboardRestTimer();
|
this._clearKeyboardRestTimer();
|
||||||
|
|
||||||
if (immediate) {
|
if (immediate) {
|
||||||
@ -2105,7 +2105,7 @@ class KeyboardController extends Signals.EventEmitter {
|
|||||||
Main.inputMethod.commit(str);
|
Main.inputMethod.commit(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
async _setOskCompletion(enabled) {
|
async setOskCompletion(enabled) {
|
||||||
if (this._oskCompletionEnabled === enabled)
|
if (this._oskCompletionEnabled === enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -2115,10 +2115,6 @@ class KeyboardController extends Signals.EventEmitter {
|
|||||||
Main.inputMethod.update();
|
Main.inputMethod.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
set oskCompletion(enabled) {
|
|
||||||
this._setOskCompletion(enabled);
|
|
||||||
}
|
|
||||||
|
|
||||||
keyvalPress(keyval) {
|
keyvalPress(keyval) {
|
||||||
this._virtualDevice.notify_keyval(Clutter.get_current_event_time() * 1000,
|
this._virtualDevice.notify_keyval(Clutter.get_current_event_time() * 1000,
|
||||||
keyval, Clutter.KeyState.PRESSED);
|
keyval, Clutter.KeyState.PRESSED);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user