@ -116,7 +116,7 @@ extern "C" {
much as possible
*/
static XFontSet fontsetCache [ 8 ] = { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } ;
static int fontset RefCount = 0 ;
static int fontset Cache RefCount = 0 ;
static const char * const fontsetnames [ ] = {
" -*-fixed-medium-r-*-*-16-*,-*-*-medium-r-*-*-16-* " ,
@ -345,6 +345,8 @@ TQXIMInputContext::TQXIMInputContext()
TQXIMInputContext : : init_xim ( ) ;
# if !defined(TQT_NO_XIM)
fontsetCacheRefCount + + ;
if ( ! ximContextList )
ximContextList = new TQPtrList < TQXIMInputContext > ;
ximContextList - > append ( this ) ;
@ -360,7 +362,6 @@ void TQXIMInputContext::setHolderWidget( TQWidget *widget )
TQInputContext : : setHolderWidget ( widget ) ;
# if !defined(TQT_NO_XIM)
fontsetRefCount + + ;
if ( ! qt_xim ) {
tqWarning ( " TQInputContext: no input method context available " ) ;
return ;
@ -441,7 +442,7 @@ TQXIMInputContext::~TQXIMInputContext()
if ( ic )
XDestroyIC ( ( XIC ) ic ) ;
if ( - - fontset RefCount = = 0 ) {
if ( - - fontset Cache RefCount = = 0 ) {
Display * dpy = TQPaintDevice : : x11AppDisplay ( ) ;
for ( int i = 0 ; i < 8 ; i + + ) {
if ( fontsetCache [ i ] & & fontsetCache [ i ] ! = ( XFontSet ) - 1 ) {