From d7603d5391a13564ac9fbb49681f4f2e60bd853d Mon Sep 17 00:00:00 2001 From: Shiki Okasaka Date: Wed, 24 Apr 2024 18:37:29 +0900 Subject: [PATCH] searchController: Let an input method process key events It is expected that users can select a candidate using the keyboard when an input method shows preedit text and optionally a candidate popup. To enable this, every key event needs to be propagated if the search entry has preedit text. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7606 --- js/ui/searchController.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/ui/searchController.js b/js/ui/searchController.js index be5d6cfa4..35c6ec18d 100644 --- a/js/ui/searchController.js +++ b/js/ui/searchController.js @@ -269,6 +269,9 @@ export const SearchController = GObject.registerClass({ } _onKeyPress(entry, event) { + if (this._text.has_preedit()) + return Clutter.EVENT_PROPAGATE; + let symbol = event.get_key_symbol(); if (symbol === Clutter.KEY_Escape) { if (this._isActivated()) {