#
# @(#)S401twle 		1.12 99/11/22 SMI
#
# Launch Desktop X Input Method Server for TWLE
# Locale: ja,ja_JP.PCK,ja_JP.UTF-8
#

if [ -x /usr/openwin/bin/htt -a -f /usr/lib/im/leif/twle.so ]; then 
	# OpenWindows
	if [ "_$_sunximswm" = "_olwm" ] ; then
		: # TWLE does not support OpenWindows
		: # do not unset DTSTARTIMS in this case

		: # for Motif or others which use XIMStatusArea
		echo "*disableStatusArea: true" \
			| /usr/openwin/bin/xrdb -m
		: # for XView which use XIMStatusCallback
		echo "OpenWindows.ImStatusStyle: none" \
			| /usr/openwin/bin/xrdb -m

	# CDE
	else
		echo "*preeditType: rootwindow" | /usr/openwin/bin/xrdb -m

		LC_ALL=zh_TW LANG=zh_TW \
		/usr/openwin/bin/htt \
			-if twle -so -nosm -lc_basiclocale zh_TW -xim htt_xbe \
			> /dev/null 2>&1 &
		DISABLE_MULTI_SCRIPT_IM=true; export DISABLE_MULTI_SCRIPT_IM
		unset DTSTARTIMS
	fi
fi
