summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-11-18 11:09:14 -0500
committerMatthias Clasen <mclasen@redhat.com>2022-11-18 11:18:48 -0500
commit9af8c6fb25f4e08ca9f4653e483e85e86b985f39 (patch)
treed1771b9b16c79bdbb36b1bfb6cb157a911d15152
parentdfbaeefc6447120b4046f6bc5de3706539df228b (diff)
downloadgtk+-9af8c6fb25f4e08ca9f4653e483e85e86b985f39.tar.gz
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.
-rw-r--r--gtk/gtkimmodule.c10
1 files changed, 10 insertions, 0 deletions
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. */