summaryrefslogtreecommitdiff
path: root/gtk/gtkimmodule.c
diff options
context:
space:
mode:
authorPeter Bloomfield <PeterBloomfield@bellsouth.net>2018-03-12 17:46:57 -0400
committerPeter Bloomfield <PeterBloomfield@bellsouth.net>2018-03-12 17:46:57 -0400
commit86cd5c04bdd4aa2cfe4ecd4cce505d23e4d09d76 (patch)
tree013c17815bc77737d4d4498eceebe3360ef95659 /gtk/gtkimmodule.c
parentd11c78c46f496ca9fc9cc7062d8acb7d80228574 (diff)
downloadgtk+-86cd5c04bdd4aa2cfe4ecd4cce505d23e4d09d76.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.
Diffstat (limited to 'gtk/gtkimmodule.c')
-rw-r--r--gtk/gtkimmodule.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk/gtkimmodule.c b/gtk/gtkimmodule.c
index 0c99553423..bdf956dd63 100644
--- a/gtk/gtkimmodule.c
+++ b/gtk/gtkimmodule.c
@@ -119,7 +119,13 @@ match_backend (const char *context_id)
{
#ifdef GDK_WINDOWING_WAYLAND
if (g_strcmp0 (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