summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Bloomfield <PeterBloomfield@bellsouth.net>2018-03-12 17:46:57 -0400
committerCarlos Garnacho <carlosg@gnome.org>2018-03-20 15:56:53 +0100
commit6e2d14037cea356638a9bea7b611cbe23bc90b47 (patch)
tree2555d98abc148a78c004301532523182526f5c1a
parent92bef46b4c9bae9946f46d598ea1d49483038455 (diff)
downloadgtk+-6e2d14037cea356638a9bea7b611cbe23bc90b47.tar.gz
gtkimmodule: make match_backend() query
…the wayland registry. Wnen _gtk_im_module_get_default_context_id calls match_backend (context_id) and the default GdkDisplay is wayland, match_backend() should return TRUE only if gdk_wayland_display_query_registry (display, "gtk_text_input_manager") returns TRUE.
-rw-r--r--gtk/gtkimmodule.c8
1 files changed, 7 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