[3/3] winex11.drv: Fold X11DRV_ImmSetOpenStatus into XIMPreEditDoneCallback.

Kusanagi Kouichi slash at ac.auone-net.jp
Thu Feb 11 23:54:33 CST 2010


Signed-off-by: Kusanagi Kouichi <slash at ac.auone-net.jp>
---
 dlls/winex11.drv/xim.c |   24 +++++++-----------------
 1 files changed, 7 insertions(+), 17 deletions(-)

diff --git a/dlls/winex11.drv/xim.c b/dlls/winex11.drv/xim.c
index 944a631..38b0a2c 100644
--- a/dlls/winex11.drv/xim.c
+++ b/dlls/winex11.drv/xim.c
@@ -122,25 +122,10 @@ void X11DRV_XIMLookupChars( const char *str, DWORD count )
     HeapFree(GetProcessHeap(), 0, wcOutput);
 }
 
-static void X11DRV_ImmSetOpenStatus(BOOL fOpen)
-{
-    if (fOpen == FALSE)
-    {
-        if (dwCompStringSize)
-            HeapFree(GetProcessHeap(),0,CompositionString);
-
-        dwCompStringSize = 0;
-        dwCompStringLength = 0;
-        CompositionString = NULL;
-    }
-
-    IME_SetOpenStatus(fOpen);
-}
-
 static int XIMPreEditStartCallback(XIC ic, XPointer client_data, XPointer call_data)
 {
     TRACE("PreEditStartCallback %p\n",ic);
-    X11DRV_ImmSetOpenStatus(TRUE);
+    IME_SetOpenStatus(TRUE);
     ximInComposeMode = TRUE;
     return -1;
 }
@@ -149,7 +134,12 @@ static void XIMPreEditDoneCallback(XIC ic, XPointer client_data, XPointer call_d
 {
     TRACE("PreeditDoneCallback %p\n",ic);
     ximInComposeMode = FALSE;
-    X11DRV_ImmSetOpenStatus(FALSE);
+    if (dwCompStringSize)
+        HeapFree(GetProcessHeap(), 0, CompositionString);
+    dwCompStringSize = 0;
+    dwCompStringLength = 0;
+    CompositionString = NULL;
+    IME_SetOpenStatus(FALSE);
 }
 
 static void XIMPreEditDrawCallback(XIM ic, XPointer client_data,
-- 
1.6.6.1




More information about the wine-patches mailing list