Don't process key events when the text input is not requested (#18990)

This commit is contained in:
Robert Ancell 2020-06-12 10:59:35 +12:00 committed by GitHub
parent 4bd6aea07c
commit 9f898e98c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;