[uim-commit] r1288 - branches/0.4/xim

ekato at freedesktop.org ekato at freedesktop.org
Mon Aug 22 20:17:32 PDT 2005


Author: ekato
Date: 2005-08-22 20:17:28 -0700 (Mon, 22 Aug 2005)
New Revision: 1288

Modified:
   branches/0.4/xim/connection.cpp
   branches/0.4/xim/main.cpp
   branches/0.4/xim/xim.h
   branches/0.4/xim/ximserver.cpp
   branches/0.4/xim/ximtrans.cpp
Log:
* xim/ : Port r1286 from trunk.


Modified: branches/0.4/xim/connection.cpp
===================================================================
--- branches/0.4/xim/connection.cpp	2005-08-23 03:07:01 UTC (rev 1287)
+++ branches/0.4/xim/connection.cpp	2005-08-23 03:17:28 UTC (rev 1288)
@@ -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: branches/0.4/xim/main.cpp
===================================================================
--- branches/0.4/xim/main.cpp	2005-08-23 03:07:01 UTC (rev 1287)
+++ branches/0.4/xim/main.cpp	2005-08-23 03:17:28 UTC (rev 1288)
@@ -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: branches/0.4/xim/xim.h
===================================================================
--- branches/0.4/xim/xim.h	2005-08-23 03:07:01 UTC (rev 1287)
+++ branches/0.4/xim/xim.h	2005-08-23 03:17:28 UTC (rev 1288)
@@ -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: branches/0.4/xim/ximserver.cpp
===================================================================
--- branches/0.4/xim/ximserver.cpp	2005-08-23 03:07:01 UTC (rev 1287)
+++ branches/0.4/xim/ximserver.cpp	2005-08-23 03:17:28 UTC (rev 1288)
@@ -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: branches/0.4/xim/ximtrans.cpp
===================================================================
--- branches/0.4/xim/ximtrans.cpp	2005-08-23 03:07:01 UTC (rev 1287)
+++ branches/0.4/xim/ximtrans.cpp	2005-08-23 03:17:28 UTC (rev 1288)
@@ -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