mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-15 05:00:09 +00:00
imwayland: Avoid TOGGLE_INPUT_PANEL requests if there's no focus
Fixes two things: 1) As GTK+ can be coerced into using the wayland IM module despite the compositor not implementing the interface, all paths not checking for global state before sending requests are prone to crashes, this one fell hit this pitfall. And 2) ensures the tap gesture only triggers TOGGLE_INPUT_PANEL if the widget IM is focused. This is a possibility on eg. WebKit pages, where its IM is only focused as long as a form element in the page is focused. Tapping elsewhere shouldn't toggle the OSK. https://gitlab.gnome.org/GNOME/gtk/issues/114 Closes: #114
This commit is contained in:
parent
6e2d14037c
commit
4f78abddfc
@ -420,6 +420,9 @@ released_cb (GtkGestureMultiPress *gesture,
|
||||
{
|
||||
GtkInputHints hints;
|
||||
|
||||
if (!global->current)
|
||||
return;
|
||||
|
||||
g_object_get (context, "input-hints", &hints, NULL);
|
||||
|
||||
if (n_press == 1 &&
|
||||
|
Loading…
Reference in New Issue
Block a user