[uim-commit] r3153 - trunk/xim

ekato at freedesktop.org ekato at freedesktop.org
Wed Mar 1 21:21:17 PST 2006


Author: ekato
Date: 2006-03-01 21:21:12 -0800 (Wed, 01 Mar 2006)
New Revision: 3153

Modified:
   trunk/xim/ximserver.cpp
Log:
* xim/ximserver.cpp (changeContext) : Return immediately if IM of
  the context is not changed.


Modified: trunk/xim/ximserver.cpp
===================================================================
--- trunk/xim/ximserver.cpp	2006-03-02 04:36:15 UTC (rev 3152)
+++ trunk/xim/ximserver.cpp	2006-03-02 05:21:12 UTC (rev 3153)
@@ -426,9 +426,14 @@
 void
 InputContext::changeContext(const char *engine)
 {
-    const char *encoding = mXic->get_encoding();
-    const char *im_lang = get_im_lang_from_engine(engine);
+    const char *encoding, *im_lang;
 
+    if (!strcmp(mEngineName, engine))
+	return;
+
+    encoding = mXic->get_encoding();
+    im_lang = get_im_lang_from_engine(engine);
+
     // Don't change im unless encoding matches for clients with legacy locales.
     if (strcmp(encoding, "UTF-8")) {
 	const char *client_locale = mXic->get_lang_region();



More information about the uim-commit mailing list