diff options
author | Matthias Clasen <mclasen@redhat.com> | 2018-03-20 15:31:49 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2018-03-20 15:31:49 +0000 |
commit | b88bffac23051871cd61c41809e88138b2dfe899 (patch) | |
tree | daf89fb7e842ffbd521d665ce926c1c7131ebe34 | |
parent | 9781ffae5180902ffb972b46c0b1673d14ae3415 (diff) | |
parent | 4f78abddfc8a815a7e02f5347d5326412190f66f (diff) | |
download | gtk+-b88bffac23051871cd61c41809e88138b2dfe899.tar.gz |
Merge branch 'wip/carlosg/fix-issue-114' into 'gtk-3-22'
Fix issue #114
See merge request GNOME/gtk!73
-rw-r--r-- | gtk/gtkimmodule.c | 8 | ||||
-rw-r--r-- | modules/input/imwayland.c | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gtk/gtkimmodule.c b/gtk/gtkimmodule.c index 018723fd4d..93c1bea0ad 100644 --- a/gtk/gtkimmodule.c +++ b/gtk/gtkimmodule.c @@ -697,7 +697,13 @@ match_backend (GtkIMContextInfo *context) { #ifdef GDK_WINDOWING_WAYLAND if (g_strcmp0 (context->context_id, "wayland") == 0) - return GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ()); + { + GdkDisplay *display = gdk_display_get_default (); + + return GDK_IS_WAYLAND_DISPLAY (display) && + gdk_wayland_display_query_registry (display, + "gtk_text_input_manager"); + } #endif #ifdef GDK_WINDOWING_BROADWAY 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 && |