From b5837bc94850caa9934d5d3aa95cced422ed3fe6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 7 Sep 2022 16:18:06 +1000 Subject: 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. --- source/blender/windowmanager/intern/wm_window.c | 8 -------- 1 file changed, 8 deletions(-) (limited to '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) | -- cgit v1.2.3