Commit 21a16d25 authored by Takashi Iwai's avatar Takashi Iwai Committed by Dominique Leuenberger
Browse files

Don't override preset xim setups

When $QT_IM_MODULE or $XMODIFIERS has been already set beforehand,
we should honor it and not override brutally.  This makes GNOME as
a good citizen coping with other IMs more smoothly.
Signed-off-by: default avatarTakashi Iwai <>
parent a21ad97f
......@@ -13,8 +13,8 @@ if [ -n "$REGION" ]; then
if [ -x @prefix@/bin/ibus-daemon ]; then
export QT_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
test -z "$QT_IM_MODULE" && export QT_IM_MODULE=ibus
test -z "$XMODIFIERS" && export XMODIFIERS=@im=ibus
exec @libexecdir@/gnome-settings-daemon
......@@ -255,9 +255,16 @@ is_program_in_path (const char *binary)
static void
set_legacy_ibus_env_vars (GDBusProxy *proxy)
const char *p;
if (is_program_in_path ("ibus-daemon")) {
set_session_env (proxy, "QT_IM_MODULE", "ibus");
set_session_env (proxy, "XMODIFIERS", "@im=ibus");
p = getenv ("QT_IM_MODULE");
if (!p || !*p)
p = "ibus";
set_session_env (proxy, "QT_IM_MODULE", p);
p = getenv ("XMODIFIERS");
if (!p || !*p)
p = "@im=ibus";
set_session_env (proxy, "XMODIFIERS", p);
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