From 17d9ec5788fba48e2c1fd62dedf23097f829e811 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Wed, 1 Mar 2023 23:42:18 +0900 Subject: [PATCH] inputMethod: Keep Capabilite.FOCUS before context.focus_in/focus_out If context.focus_out() is called *after* context.set_capabilities(0), The FocusOut D-Bus method is ignored because of no FOCUS capability. If context.focus_out() is called *before* context.set_capabilities(0), The 0 capability is set to the next focused context and the FocusIn D-Bus method is ignored because of no FOCUS capability. So context.set_capabilities(0) should not be called. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6415 Part-of: --- js/misc/inputMethod.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/misc/inputMethod.js b/js/misc/inputMethod.js index aabd280c8..d944c2978 100644 --- a/js/misc/inputMethod.js +++ b/js/misc/inputMethod.js @@ -188,6 +188,7 @@ export const InputMethod = GObject.registerClass({ vfunc_focus_in(focus) { this._currentFocus = focus; if (this._context) { + this.update(); this._context.focus_in(); this._emitRequestSurrounding(); } @@ -371,7 +372,6 @@ export const InputMethod = GObject.registerClass({ _fullReset() { this._context.set_content_type(0, 0); this._context.set_cursor_location(0, 0, 0, 0); - this._context.set_capabilities(0); this._context.reset(); }