From 9b52efba874bce2a83bcfdd36d7c0e53534401bb17c21b1b12a9e597761f6b81 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 8 Sep 2021 09:09:17 +0000 Subject: [PATCH] ibus input method OBS-URL: https://build.opensuse.org/package/show/editors/emacs?expand=0&rev=312 --- emacs.changes | 7 +++++++ emacs.sh | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/emacs.changes b/emacs.changes index b7f3e2b..79e6ad0 100644 --- a/emacs.changes +++ b/emacs.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Sep 8 09:05:56 UTC 2021 - Dr. Werner Fink + +- Work for boo#1183497: make sure that if ibus is the input method + that there exists a working gtk immodule for ibus as well as the + ibus daemon is up and running + ------------------------------------------------------------------- Wed Jul 21 09:22:45 UTC 2021 - Andreas Schwab diff --git a/emacs.sh b/emacs.sh index e9555e3..6315e98 100644 --- a/emacs.sh +++ b/emacs.sh @@ -137,5 +137,40 @@ if test -z "NO_AT_BRIDGE" ; then fi unset gsettings fi +# +# Check input method for working ibus setup +# +case "$XMODIFIERS" in +@im=ibus*) + _arch=$(getconf LONG_BIT) + if test "$_arch" != 64 + then + unset _arch + else + _arch=-64 + fi + if type -p gtk-query-immodules-3.0${_arch} &> /dev/null + then + _ibus=$(gtk-query-immodules-3.0${_arch} | grep im-ibus) + else + unset _ibus + fi + if test -n "$_ibus" + then + if test -z "$GTK_IM_MODULE" -o "$GTK_IM_MODULE" != ibus + then + export GTK_IM_MODULE=ibus + fi + else + unset XMODIFIERS + fi + unset _ibus _arch + if ! ibus list-engine &> /dev/null + then + unset GTK_IM_MODULE XMODIFIERS + fi + ;; +*) +esac unset G_MESSAGES_DEBUG G_DEBUG G_MESSAGES_PREFIXED exec -a $arg0 ${1+"$@"} "${argv[@]}"