imm32: Simplify ImmInternalSendIMENotify

Dmitry Timoshkov dmitry at codeweavers.com
Tue Feb 27 01:55:45 CST 2007


Hello,

Changelog:
    imm32: Simplify ImmInternalSendIMENotify.

---
 dlls/imm32/imm.c |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c
index ff4916a..02a362e 100644
--- a/dlls/imm32/imm.c
+++ b/dlls/imm32/imm.c
@@ -171,18 +171,15 @@ static void ImmInternalPostIMEMessage(UINT msg, WPARAM wParam, LPARAM lParam)
 
 static LRESULT ImmInternalSendIMENotify(WPARAM notify, LPARAM lParam)
 {
-    LRESULT rc = 0;
+    HWND target;
 
-    if (root_context->hwnd)
-       rc = SendMessageW(root_context->hwnd, WM_IME_NOTIFY, notify, lParam);
-    else
-    {
-       HWND target = GetFocus();
-       if (target)
-           rc = SendMessageW(target, WM_IME_NOTIFY, notify, lParam);
-    }
+    target = root_context->hwnd;
+    if (!target) target = GetFocus();
 
-    return rc;
+    if (target)
+       return SendMessageW(target, WM_IME_NOTIFY, notify, lParam);
+
+    return 0;
 }
 
 static void ImmInternalSetOpenStatus(BOOL fOpen)
-- 
1.5.0






More information about the wine-patches mailing list