[uim-commit] r1027 - trunk/uim
tkng at freedesktop.org
tkng at freedesktop.org
Mon Jul 25 10:27:15 EST 2005
Author: tkng
Date: 2005-07-24 17:27:12 -0700 (Sun, 24 Jul 2005)
New Revision: 1027
Modified:
trunk/uim/uim.c
Log:
* uim/uim.c:
-(uim_quit): Return if uim_quit already called.
Modified: trunk/uim/uim.c
===================================================================
--- trunk/uim/uim.c 2005-07-24 23:27:11 UTC (rev 1026)
+++ trunk/uim/uim.c 2005-07-25 00:27:12 UTC (rev 1027)
@@ -58,6 +58,7 @@
struct uim_im *uim_im_array;
int uim_nr_im;
static int uim_initialized;
+static int uim_quiting;
void
uim_set_preedit_cb(uim_context uc,
@@ -670,9 +671,11 @@
{
int i;
- if (!uim_initialized) {
+ if (!uim_initialized || uim_quiting) {
return;
}
+ /* Some multithreaded applications calls uim_quit bursty. */
+ uim_quiting = 1;
/* release still active contexts */
for (i = 0; i < CONTEXT_ARRAY_SIZE; i++) {
@@ -686,4 +689,5 @@
free(uim_last_client_encoding);
uim_last_client_encoding = NULL;
uim_initialized = 0;
+ uim_quiting = 0;
}
More information about the uim-commit
mailing list