diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2018-02-11 22:04:30 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2018-02-12 14:44:30 +0100 |
commit | 6934b83f44ad31ff19bd81d663065bf983a842ff (patch) | |
tree | 3c71201e27428bbcb77095b344cb4de53bf864b2 | |
parent | 37aab9280af442935ef23ad27eeba8c4fb1ecca7 (diff) | |
download | mutter-wip/carlosg/text-input-fixes.tar.gz |
wayland: Avoid clutter_input_focus method calls when unfocusedwip/carlosg/text-input-fixes
If text_input_enable() is called when there no active IM (eg. running plain
mutter), some ClutterInputFocus method calls that are not allowed while
unfocused will end up called, triggering critical warnings.
If there is no IM return early here, all other calls are superfluous then.
-rw-r--r-- | src/wayland/meta-wayland-text-input.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wayland/meta-wayland-text-input.c b/src/wayland/meta-wayland-text-input.c index 798b3d2a9..63c11462d 100644 --- a/src/wayland/meta-wayland-text-input.c +++ b/src/wayland/meta-wayland-text-input.c @@ -301,6 +301,8 @@ text_input_enable (struct wl_client *client, input_method = clutter_backend_get_input_method (clutter_get_default_backend ()); if (input_method) clutter_input_method_focus_in (input_method, focus); + else + return; } show_preedit = (flags & GTK_TEXT_INPUT_ENABLE_FLAGS_CAN_SHOW_PREEDIT) != 0; |