diff --git a/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp b/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp index e9dbcdd2..20ca4424 100644 --- a/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp +++ b/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp @@ -343,6 +343,12 @@ TQXIMInputContext::TQXIMInputContext() { if(!isInitXIM) TQXIMInputContext::init_xim(); + +#if !defined(TQT_NO_XIM) + if( ! ximContextList ) + ximContextList = new TQPtrList; + ximContextList->append( this ); +#endif // !TQT_NO_XIM } @@ -424,10 +430,6 @@ void TQXIMInputContext::setHolderWidget( TQWidget *widget ) // when resetting the input context, preserve the input state (void) XSetICValues((XIC) ic, XNResetState, XIMPreserveState, (char *) 0); - - if( ! ximContextList ) - ximContextList = new TQPtrList; - ximContextList->append( this ); #endif // !TQT_NO_XIM }