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._keyboardController.oskCompletion = false;
|
||||
this._keyboardController.setOskCompletion(false);
|
||||
this._keyboardController.destroy();
|
||||
|
||||
Main.layoutManager.untrackChrome(this);
|
||||
@ -1723,7 +1723,7 @@ export const Keyboard = GObject.registerClass({
|
||||
return;
|
||||
}
|
||||
|
||||
this._keyboardController.oskCompletion = true;
|
||||
this._keyboardController.setOskCompletion(true);
|
||||
this._clearKeyboardRestTimer();
|
||||
|
||||
if (immediate) {
|
||||
@ -1758,7 +1758,7 @@ export const Keyboard = GObject.registerClass({
|
||||
if (!this._keyboardVisible)
|
||||
return;
|
||||
|
||||
this._keyboardController.oskCompletion = false;
|
||||
this._keyboardController.setOskCompletion(false);
|
||||
this._clearKeyboardRestTimer();
|
||||
|
||||
if (immediate) {
|
||||
@ -2105,7 +2105,7 @@ class KeyboardController extends Signals.EventEmitter {
|
||||
Main.inputMethod.commit(str);
|
||||
}
|
||||
|
||||
async _setOskCompletion(enabled) {
|
||||
async setOskCompletion(enabled) {
|
||||
if (this._oskCompletionEnabled === enabled)
|
||||
return;
|
||||
|
||||
@ -2115,10 +2115,6 @@ class KeyboardController extends Signals.EventEmitter {
|
||||
Main.inputMethod.update();
|
||||
}
|
||||
|
||||
set oskCompletion(enabled) {
|
||||
this._setOskCompletion(enabled);
|
||||
}
|
||||
|
||||
keyvalPress(keyval) {
|
||||
this._virtualDevice.notify_keyval(Clutter.get_current_event_time() * 1000,
|
||||
keyval, Clutter.KeyState.PRESSED);
|
||||
|
Loading…
x
Reference in New Issue
Block a user