summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/src/inputmethods/xim/qximinputcontext_x11.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp b/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp
index 20ca44244..e56df9d99 100644
--- a/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp
+++ b/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp
@@ -116,7 +116,7 @@ extern "C" {
much as possible
*/
static XFontSet fontsetCache[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
-static int fontsetRefCount = 0;
+static int fontsetCacheRefCount = 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 ( --fontsetRefCount == 0 ) {
+ if ( --fontsetCacheRefCount == 0 ) {
Display *dpy = TQPaintDevice::x11AppDisplay();
for ( int i = 0; i < 8; i++ ) {
if ( fontsetCache[i] && fontsetCache[i] != (XFontSet)-1 ) {