52495f2c74
- Upstream update to 1.5.30 * Fix Super key is not handled in GTK 4 applications * ui/gtk3: Fix SEGV with Super-space in Wayland * tools: Fix ibus start/restart in Plasma Wayland 5696033 * ui/gtk3: Fix ibus-daemon timeout in Plasma Wayland * ui/gtk3: Set Indicator status at launching time * Implement preedit color in Plasma Wayland * Implement ibus start/restart for Plasma Wayland * Show preferences menu item in activate menu * Fix control keys with game application * Fix typing freeze with barcode reader * Fix preedit issue with X applications * setup/enginedialog: Improve the search for engines - Refresh ibus-ui-gtk3-restart-via-systemd.patch - Drop patches merged by the upstream * ibus-complete-preedit-signals-for-postprocesskeyevent.patch * ibus-enginesimple-dont-commit-any-characters.patch OBS-URL: https://build.opensuse.org/request/show/1186022 OBS-URL: https://build.opensuse.org/package/show/M17N/ibus?expand=0&rev=290
58 lines
1.5 KiB
Plaintext
58 lines
1.5 KiB
Plaintext
if ! type ibus-daemon > /dev/null 2>&1 ; then
|
|
echo "ibus is not available."
|
|
return 1
|
|
fi
|
|
|
|
# explicitly set below, as referred in xdg autostart
|
|
export INPUT_METHOD=ibus
|
|
|
|
case "$WINDOWMANAGER" in
|
|
# GNOME 3 Settings Daemon keyboard plugin manages all ibus settings itself,
|
|
# so don't do manual setup&startup of ibus otherwise it would conflict with
|
|
# G-S-D. see bnc#873016.
|
|
*gnome*)
|
|
SOURCES=$(gsettings get org.freedesktop.ibus.general preload-engines)
|
|
if [ "$SOURCES" == '@as []' ]; then
|
|
echo "initial GNOME startup, ibus default configuration applied"
|
|
ibus-daemon -d
|
|
timer=5
|
|
while [ "$SOURCES" == '@as []' ] && [ ${timer} -gt 0 ]; do
|
|
sleep 1
|
|
timer=$[${timer}-1]
|
|
SOURCES=$(gsettings get org.freedesktop.ibus.general preload-engines)
|
|
done
|
|
ibus exit
|
|
fi
|
|
# make sure G-S-D keyboard plugin is active
|
|
echo "ibus will be managed by GNOME."
|
|
gsettings set org.gnome.settings-daemon.plugins.keyboard active true
|
|
return 0
|
|
;;
|
|
esac
|
|
|
|
|
|
export XMODIFIERS="@im=ibus"
|
|
export GTK_IM_MODULE=ibus
|
|
export QT_IM_SWITCHER=imsw-multi
|
|
# Qt5
|
|
export QT_IM_MODULE=ibus
|
|
# Qt4
|
|
if [ -e /usr/$SYS_LIB/qt4/plugins/inputmethods/libqtim-ibus.so ]; then
|
|
export QT4_IM_MODULE=ibus
|
|
else
|
|
export QT4_IM_MODULE=xim
|
|
fi
|
|
|
|
case "$WINDOWMANAGER" in
|
|
*kde*|*plasma*|*xfce*|*lxde*)
|
|
# started via xdg autostart
|
|
;;
|
|
*)
|
|
# FIXME: a little bit of delay is required to avoid race
|
|
(sleep 2; ibus-daemon --xim -d) &
|
|
;;
|
|
esac
|
|
|
|
# success:
|
|
return 0
|