From fb35644e9c329da60367c252d5fa0273ad1ec6a1 Mon Sep 17 00:00:00 2001 From: Alexander Malmberg Date: Wed, 18 Sep 2002 22:34:44 +0000 Subject: [PATCH] Track all XIC:s and destroy them explicitly to work around xfree86 bug. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@14485 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Headers/x11/XGInputServer.h | 7 +++++++ Source/x11/XIMInputServer.m | 30 ++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) diff --git a/ChangeLog b/ChangeLog index a0259c5..9e4f6fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-09-19 00:33 Alexander Malmberg + + * Header/x11/XGInputServer.h, Source/x11/XIMInputServer.m: Track + all created XIC:s and destroy them explicitly. + 2002-09-18 19:59 Alexander Malmberg * Source/art/blit.h, Source/art/blit.m, Source/art/composite.m: diff --git a/Headers/x11/XGInputServer.h b/Headers/x11/XGInputServer.h index 252c7a2..8819e96 100644 --- a/Headers/x11/XGInputServer.h +++ b/Headers/x11/XGInputServer.h @@ -45,6 +45,13 @@ XIMStyle xim_style; NSMutableData *dbuf; NSStringEncoding encoding; + + /* Track the XIC:s and destroy them explicitly to work around an XFree86 + bug: + http://www.xfree86.org/pipermail/xpert/2002-June/018370.html + */ + XIC *xics; + int num_xics; } - (id) initWithDelegate: (id)aDelegate diff --git a/Source/x11/XIMInputServer.m b/Source/x11/XIMInputServer.m index 15bd9bf..3d77432 100644 --- a/Source/x11/XIMInputServer.m +++ b/Source/x11/XIMInputServer.m @@ -35,6 +35,7 @@ #include "x11/XGInputServer.h" #include + @interface XIMInputServer (XIMPrivate) - (BOOL) ximInit: (Display *)dpy; - (void) ximClose; @@ -109,6 +110,7 @@ DESTROY(server_name); DESTROY(dbuf); [self ximClose]; + [super dealloc]; } /* ---------------------------------------------------------------------- @@ -277,7 +279,17 @@ - (void) ximClose { + int i; + for (i=0;i