[uim-commit] r1286 - trunk/xim

ekato at freedesktop.org ekato at freedesktop.org
Mon Aug 22 20:02:46 PDT 2005


Author: ekato
Date: 2005-08-22 20:02:44 -0700 (Mon, 22 Aug 2005)
New Revision: 1286

Modified:
   trunk/xim/connection.cpp
   trunk/xim/main.cpp
   trunk/xim/xim.h
   trunk/xim/ximserver.cpp
   trunk/xim/ximtrans.cpp
Log:
* xim/connection.cpp (XConnection::writeProc) : Ignore SIGUSR1
  while XFlush().
* xim/xim.h : Remove unused force_event().
* xim/ximtrans.cpp : Ditto.
* xim/main.cpp (reload_uim) : Revive focusIn() deleted in r1252,
  which is actually needed to set appropriate locale for the
  focused context.
* xim/ximserver.cpp (XimServer::changeContext) : Update comment.


Modified: trunk/xim/connection.cpp
===================================================================
--- trunk/xim/connection.cpp	2005-08-22 19:32:35 UTC (rev 1285)
+++ trunk/xim/connection.cpp	2005-08-23 03:02:44 UTC (rev 1286)
@@ -39,6 +39,7 @@
 #include <unistd.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <signal.h>
 #include "connection.h"
 #include <list>
 #include <map>
@@ -398,7 +399,11 @@
     writePassivePacket();
     writeNormalPacket();
 
+    // interrupt while _XFlushInt() here will cause lock up of the display.
+    sig_t old_sigusr1 = signal(SIGUSR1, SIG_IGN);
     XFlush(XimServer::gDpy);
+    signal(SIGUSR1, old_sigusr1);
+
     if (mIsCloseWait) {
 	remove_window_watch(mClientWin);
 	mClientWin = None;

Modified: trunk/xim/main.cpp
===================================================================
--- trunk/xim/main.cpp	2005-08-22 19:32:35 UTC (rev 1285)
+++ trunk/xim/main.cpp	2005-08-23 03:02:44 UTC (rev 1286)
@@ -539,6 +539,11 @@
 	}
     }
 
+    // make sure to use appropriate locale for the focused context
+    InputContext *focusedContext = InputContext::focusedContext();
+    if (focusedContext)
+	focusedContext->focusIn();
+
     pretrans_setup();
 }
 

Modified: trunk/xim/xim.h
===================================================================
--- trunk/xim/xim.h	2005-08-22 19:32:35 UTC (rev 1285)
+++ trunk/xim/xim.h	2005-08-23 03:02:44 UTC (rev 1286)
@@ -327,8 +327,6 @@
 };
 
 XimIC *create_ic(Connection *, RxPacket *, int imid, int id, const char *engine);
-void force_event(Window w);
-
 void procXClientMessage(XClientMessageEvent *m);
 
 #endif

Modified: trunk/xim/ximserver.cpp
===================================================================
--- trunk/xim/ximserver.cpp	2005-08-22 19:32:35 UTC (rev 1285)
+++ trunk/xim/ximserver.cpp	2005-08-23 03:02:44 UTC (rev 1286)
@@ -131,7 +131,7 @@
     for (it = ic_list.begin(); it != ic_list.end(); it++) {
 	(*it)->changeContext(engine);
     }
-    // make sure to update locale of focused context
+    // make sure to use appropriate locale for the focused context
     InputContext *focusedContext = InputContext::focusedContext();
     if (focusedContext)
 	focusedContext->focusIn();

Modified: trunk/xim/ximtrans.cpp
===================================================================
--- trunk/xim/ximtrans.cpp	2005-08-22 19:32:35 UTC (rev 1285)
+++ trunk/xim/ximtrans.cpp	2005-08-23 03:02:44 UTC (rev 1286)
@@ -189,16 +189,6 @@
     }
 }
 
-void force_event(Window w)
-{
-    Window fw;
-    int rev;
-    XGetInputFocus(XimServer::gDpy, &fw, &rev);
-    XSetInputFocus(XimServer::gDpy, w, rev, CurrentTime);
-    XSetInputFocus(XimServer::gDpy, fw, rev, CurrentTime);
-    XFlush(XimServer::gDpy);
-}
-
 Connection::Connection(XimServer *svr)
 {
     mIsCloseWait = false;



More information about the uim-commit mailing list