keyboard: Synchronize input method state after toggling completion
Make the input method synchronize its state after the engine changes resulting from completion being toggled. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2512>
This commit is contained in:
parent
ff09c4efc1
commit
b2f2266199
@ -352,4 +352,15 @@ var InputMethod = GObject.registerClass({
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
update() {
|
||||||
|
if (!this._context)
|
||||||
|
return;
|
||||||
|
this._updateCapabilities();
|
||||||
|
this._context.set_content_type(this._purpose, this._hints);
|
||||||
|
this._context.set_cursor_location(
|
||||||
|
this._cursorRect.x, this._cursorRect.y,
|
||||||
|
this._cursorRect.width, this._cursorRect.height);
|
||||||
|
this._emitRequestSurrounding();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
@ -1893,7 +1893,7 @@ var Keyboard = GObject.registerClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._oskCompletionEnabled =
|
this._oskCompletionEnabled =
|
||||||
IBusManager.getIBusManager().setCompletionEnabled(true);
|
IBusManager.getIBusManager().setCompletionEnabled(true, () => Main.inputMethod.update());
|
||||||
this._clearKeyboardRestTimer();
|
this._clearKeyboardRestTimer();
|
||||||
|
|
||||||
if (immediate) {
|
if (immediate) {
|
||||||
@ -1928,7 +1928,7 @@ var Keyboard = GObject.registerClass({
|
|||||||
if (!this._keyboardVisible)
|
if (!this._keyboardVisible)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
IBusManager.getIBusManager().setCompletionEnabled(false);
|
IBusManager.getIBusManager().setCompletionEnabled(false, () => Main.inputMethod.update());
|
||||||
this._oskCompletionEnabled = false;
|
this._oskCompletionEnabled = false;
|
||||||
this._clearKeyboardRestTimer();
|
this._clearKeyboardRestTimer();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user