From fb71b040cc2924e79981c7727aa06ed7e405e154 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 11 Jun 2020 16:49:19 +1200 Subject: [PATCH] Don't process key events when the text input is not requested --- shell/platform/linux/fl_text_input_plugin.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shell/platform/linux/fl_text_input_plugin.cc b/shell/platform/linux/fl_text_input_plugin.cc index e615fda352715..a50c60b804f0d 100644 --- a/shell/platform/linux/fl_text_input_plugin.cc +++ b/shell/platform/linux/fl_text_input_plugin.cc @@ -288,6 +288,10 @@ FlTextInputPlugin* fl_text_input_plugin_new(FlBinaryMessenger* messenger) { gboolean fl_text_input_plugin_filter_keypress(FlTextInputPlugin* self, GdkEventKey* event) { g_return_val_if_fail(FL_IS_TEXT_INPUT_PLUGIN(self), FALSE); + + if (self->client_id == kClientIdUnset) + return FALSE; + if (gtk_im_context_filter_keypress(self->im_context, event)) return TRUE;