[Bf-blender-cvs] [e9d4a20a59a] master: Cleanup: tablet press could fall through to release on GHOST/Win32

Campbell Barton noreply at git.blender.org
Wed Aug 31 07:05:21 CEST 2022


Commit: e9d4a20a59a82125f5b84e17b0e9a9a73059152e
Author: Campbell Barton
Date:   Wed Aug 31 14:26:53 2022 +1000
Branches: master
https://developer.blender.org/rBe9d4a20a59a82125f5b84e17b0e9a9a73059152e

Cleanup: tablet press could fall through to release on GHOST/Win32

Introduced in [0], checking the logic here, there seems to be no reason
a press event should ever run release logic, relocate break statement.

In practice this was unlikely to cause problems as peeking into press
events would need to fail, peeking into release would need to succeed.
Even so, better avoid accidental fall through in switch statements.

[0]: 6f158f834dcfa638639391f37afcb2ca8457cb45

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

M	intern/ghost/intern/GHOST_SystemWin32.cpp

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

diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index d011f413345..8b196ca3118 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -900,11 +900,11 @@ void GHOST_SystemWin32::processWintabEvent(GHOST_WindowWin32 *window)
               new GHOST_EventButton(info.time, info.type, window, info.button, info.tabletData));
 
           mouseMoveHandled = true;
-          break;
         }
         else {
           WINTAB_PRINTF(" ... but no system button\n");
         }
+        break;
       }
       case GHOST_kEventButtonUp: {
         WINTAB_PRINTF("HWND %p Wintab button up", window->getHWND());



More information about the Bf-blender-cvs mailing list