diff --git a/x11-tools.changes b/x11-tools.changes index d14cafb..6aaecb8 100644 --- a/x11-tools.changes +++ b/x11-tools.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Dec 9 15:04:22 UTC 2013 - swyear@gmail.com + +- modify xim to avoid gnome-settings-daemon reset XMODIFIERS and + QT_IM_MODULE (bnc#853063) + ------------------------------------------------------------------- Tue Oct 22 13:09:22 UTC 2013 - sndirsch@suse.com diff --git a/xim b/xim index ac279e3..6ce08de 100644 --- a/xim +++ b/xim @@ -88,6 +88,24 @@ adduserenv () { esac } +# workaround for bnc#853063 +# activate/deactivate g-s-d keyboard plugin depending on IM +gnome_ibus_workaround () { + local im=$1 + im=${im##*/} + im=${im#[0-9][0-9]-} + test "$im" = "none" && return + if [ "${WINDOWMANAGER##*/}" = "gnome-session" ]; then + local active + if [ "$im" = "ibus" ]; then + active=true + else + active=false + fi + gsettings set org.gnome.settings-daemon.plugins.keyboard active $active + fi +} + # if gdm passes the language to Xsession, we should not override this # see http://bugzilla.novell.com/show_bug.cgi?id=440371 # The test for $GDM_LANG needs to be changed slightly as soon as other @@ -117,6 +135,7 @@ if [ "$INPUT_METHOD" != "" ]; then source /etc/X11/xim.d/$INPUT_METHOD if [ "$?" == "0" ]; then echo "Start of $INPUT_METHOD succeeded." + gnome_ibus_workaround $INPUT_METHOD return 0; else echo "Start of $INPUT_METHOD failed." @@ -151,6 +170,7 @@ for subdir in $subdirlist ; do source $im if [ "$?" == "0" ]; then echo "$im started sucessfully" + gnome_ibus_workaround $im return 0 else echo "$im failed"