Ken Thomases : winemac: Return 0 from ToUnicodeEx() for a key release.

Alexandre Julliard julliard at winehq.org
Fri May 3 15:24:50 CDT 2013


Module: wine
Branch: master
Commit: 7c808ddfbc2c4a0cb489a76eaf8a894bd1678fea
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7c808ddfbc2c4a0cb489a76eaf8a894bd1678fea

Author: Ken Thomases <ken at codeweavers.com>
Date:   Thu May  2 18:56:39 2013 -0500

winemac: Return 0 from ToUnicodeEx() for a key release.

---

 dlls/winemac.drv/keyboard.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/dlls/winemac.drv/keyboard.c b/dlls/winemac.drv/keyboard.c
index 33f7994..98d17ba 100644
--- a/dlls/winemac.drv/keyboard.c
+++ b/dlls/winemac.drv/keyboard.c
@@ -1372,6 +1372,9 @@ INT CDECL macdrv_ToUnicodeEx(UINT virtKey, UINT scanCode, const BYTE *lpKeyState
 
     if (is_menu)
     {
+        if (keyAction == kUCKeyActionUp)
+            goto done;
+
         options = kUCKeyTranslateNoDeadKeysMask;
         deadKeyState = 0;
     }
@@ -1390,8 +1393,13 @@ INT CDECL macdrv_ToUnicodeEx(UINT virtKey, UINT scanCode, const BYTE *lpKeyState
         goto done;
     }
     if (!is_menu)
+    {
         thread_data->dead_key_state = deadKeyState;
 
+        if (keyAction == kUCKeyActionUp)
+            goto done;
+    }
+
     if (len == 0 && deadKeyState)
     {
         /* Repeat the translation, but disabling dead-key generation to




More information about the wine-cvs mailing list