--- qt-x11-free-3.3.3/src/kernel/qapplication_x11.cpp.orig Thu Aug 5 23:42:03 2004 +++ qt-x11-free-3.3.3/src/kernel/qapplication_x11.cpp Sat Aug 14 16:41:54 2004 @@ -1026,18 +1026,36 @@ settings.readBoolEntry("/qt/useRtlExtensions", FALSE); #ifndef QT_NO_XIM - if (xim_preferred_style == 0) { + if (qt_xim_preferred_style == 0) { QString ximInputStyle = settings.readEntry( "/qt/XIMInputStyle", QObject::trUtf8( "On The Spot" ) ).lower(); if ( ximInputStyle == "on the spot" ) - xim_preferred_style = XIMPreeditCallbacks | XIMStatusNothing; + qt_xim_preferred_style = XIMPreeditCallbacks | XIMStatusNothing; else if ( ximInputStyle == "over the spot" ) - xim_preferred_style = XIMPreeditPosition | XIMStatusNothing; + qt_xim_preferred_style = XIMPreeditPosition | XIMStatusNothing; else if ( ximInputStyle == "off the spot" ) - xim_preferred_style = XIMPreeditArea | XIMStatusArea; + qt_xim_preferred_style = XIMPreeditArea | XIMStatusArea; else if ( ximInputStyle == "root" ) - xim_preferred_style = XIMPreeditNothing | XIMStatusNothing; + qt_xim_preferred_style = XIMPreeditNothing | XIMStatusNothing; + } + + /* + The identifier name of an input method is acquired from the + configuration file as a default. If a environment variable + "QT_IM_SWITCHER" is not empty it will overwrite the + configuration file. The "imsw-multi" becomes the default if the entry + is not configured. + */ + if ( getenv( "QT_IM_SWITCHER" ) ) + defaultIM = getenv( "QT_IM_SWITCHER" ); + else + defaultIM = settings.readEntry( "/qt/DefaultInputMethodSwitcher", "imsw-multi" ); + + // defaultIM is restricted to be an IM-switcher. An IM-switcher + // has a 'imsw-' prefix + if ( defaultIM.find( "imsw-" ) != 0 ) { + defaultIM = "imsw-multi"; } #endif