inputMethod: Check that there is an existing cursor location
Commit17d9ec5788
made the input method call update() more eagerly, but also at times that it does not have a cursor position yet. Make it bail out correctly in that situation. Fixes:17d9ec5788
("inputMethod: Keep Capabilite.FOCUS before context.focus_in/focus_out") Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2876>
This commit is contained in:
parent
c9741ae3d5
commit
5e36a06835
@ -380,9 +380,11 @@ export const InputMethod = GObject.registerClass({
|
||||
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);
|
||||
if (this._cursorRect) {
|
||||
this._context.set_cursor_location(
|
||||
this._cursorRect.x, this._cursorRect.y,
|
||||
this._cursorRect.width, this._cursorRect.height);
|
||||
}
|
||||
this._emitRequestSurrounding();
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user