[Bf-blender-cvs] [b5837bc9485] master: WM: don't clear modifiers when the window is de-activated

Campbell Barton noreply at git.blender.org
Wed Sep 7 08:24:32 CEST 2022


Commit: b5837bc94850caa9934d5d3aa95cced422ed3fe6
Author: Campbell Barton
Date:   Wed Sep 7 16:18:06 2022 +1000
Branches: master
https://developer.blender.org/rBb5837bc94850caa9934d5d3aa95cced422ed3fe6

WM: don't clear modifiers when the window is de-activated

Leave the modifiers as they were so comparing with previous modifiers
on window re-activation isn't detected as a state change.

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

M	source/blender/windowmanager/intern/wm_window.c

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

diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 359ea209021..3c37168f831 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -1125,14 +1125,6 @@ static bool ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_pt
       case GHOST_kEventWindowDeactivate:
         wm_event_add_ghostevent(wm, win, type, data);
         win->active = 0; /* XXX */
-
-        /* When window activation is enabled, these modifiers are set with window activation.
-         * Otherwise leave them set so re-activation doesn't loose keys which are held. */
-#ifdef USE_WIN_ACTIVATE
-        win->eventstate->modifier = 0;
-        win->eventstate->keymodifier = 0;
-#endif
-
         break;
       case GHOST_kEventWindowActivate: {
         const int keymodifier = ((query_qual(SHIFT) ? KM_SHIFT : 0) |



More information about the Bf-blender-cvs mailing list