[Bf-blender-cvs] [303216d3d3a] temp-win32-dead-key-fix: Fix for T103119 by harley, see: P3387

Campbell Barton noreply at git.blender.org
Tue Dec 13 03:08:18 CET 2022


Commit: 303216d3d3ab84f410ae1300bc397f757ffc5dfd
Author: Campbell Barton
Date:   Tue Dec 13 13:07:26 2022 +1100
Branches: temp-win32-dead-key-fix
https://developer.blender.org/rB303216d3d3ab84f410ae1300bc397f757ffc5dfd

Fix for T103119 by harley, see: P3387

===================================================================

M	intern/ghost/intern/GHOST_SystemWin32.cpp

===================================================================

diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index 7aef23b39b6..089b2bcec88 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -1210,11 +1210,8 @@ GHOST_EventKey *GHOST_SystemWin32::processKeyEvent(GHOST_WindowWin32 *window, RA
     const bool ctrl_pressed = has_state && state[VK_CONTROL] & 0x80;
     const bool alt_pressed = has_state && state[VK_MENU] & 0x80;
 
-    if (!key_down) {
-      /* Pass. */
-    }
     /* No text with control key pressed (Alt can be used to insert special characters though!). */
-    else if (ctrl_pressed && !alt_pressed) {
+    if (ctrl_pressed && !alt_pressed) {
       /* Pass. */
     }
     /* Don't call #ToUnicodeEx on dead keys as it clears the buffer and so won't allow diacritical
@@ -1234,6 +1231,9 @@ GHOST_EventKey *GHOST_SystemWin32::processKeyEvent(GHOST_WindowWin32 *window, RA
           utf8_char[0] = '\0';
         }
       }
+      if (!key_down) {
+        utf8_char[0] = '\0';
+      }
     }
 
 #ifdef WITH_INPUT_IME



More information about the Bf-blender-cvs mailing list