From: Carlos Garnacho Date: Tue, 20 Mar 2018 14:17:31 +0000 (+0100) Subject: imwayland: Avoid TOGGLE_INPUT_PANEL requests if there's no focus X-Git-Tag: archive/raspbian/3.22.29-3+rpi1^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=178798a7b26908d41212e216002b3b1f0ca503aa;p=gtk%2B3.0.git 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. Origin: upstream, 3.22.30, commit:4f78abddfc8a815a7e02f5347d5326412190f66f Bug: https://gitlab.gnome.org/GNOME/gtk/issues/114 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=893696 Gbp-Pq: Name 0010-imwayland-Avoid-TOGGLE_INPUT_PANEL-requests-if-there.patch --- diff --git a/modules/input/imwayland.c b/modules/input/imwayland.c index 64605a1124..30d253665b 100644 --- a/modules/input/imwayland.c +++ b/modules/input/imwayland.c @@ -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 &&