Commit 6e2d1403 authored by Peter Bloomfield's avatar Peter Bloomfield Committed by Carlos Garnacho

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.
parent 92bef46b
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment