From: Matthias Clasen Date: Fri, 18 Nov 2022 16:09:14 +0000 (-0500) Subject: immmodule: Warn if GTK_IM_MODULE is bad X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~9^2~89^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9af8c6fb25f4e08ca9f4653e483e85e86b985f39;p=gtk4.git immmodule: Warn if GTK_IM_MODULE is bad If we don't find an immodule matching the ids in the GTK_IM_MODULE envvar, print a warning. --- diff --git a/gtk/gtkimmodule.c b/gtk/gtkimmodule.c index 6ef4a3a179..00f199dbf8 100644 --- a/gtk/gtkimmodule.c +++ b/gtk/gtkimmodule.c @@ -199,6 +199,16 @@ _gtk_im_module_get_default_context_id (GdkDisplay *display) if (context_id) return context_id; + else + { + static gboolean warned; + + if (!warned) + { + g_warning ("No IM module matching GTK_IM_MODULE=%s found", envvar); + warned = TRUE; + } + } } /* Check if the certain immodule is set in XSETTINGS. */