Commit: 44272fdd23e3b4d023d9dfa91401a33bcef427e7 Author: Campbell Barton Date: Sat Sep 17 23:54:23 2022 +1000 Branches: master https://developer.blender.org/rB44272fdd23e3b4d023d9dfa91401a33bcef427e7
WM: send a modifier press when activating a window with modifier held Previously the a simulated event was sent for releasing modifiers on activation but pressing only set the eventstate flag. Prefer the simulated events since press/release events are used in some modal key-maps. =================================================================== 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 208b3dbc89d..9180c53aeb5 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -1167,7 +1167,12 @@ static bool ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_pt #ifdef USE_WIN_ACTIVATE else { if (keymodifier & g_modifier_table[i].flag) { - win->eventstate->modifier |= g_modifier_table[i].flag; + for (int side = 0; side < 2; side++) { + if (keymodifier_sided[side] & g_modifier_table[i].flag) { + kdata.key = g_modifier_table[i].ghost_key_pair[side]; + wm_event_add_ghostevent(wm, win, GHOST_kEventKeyDown, &kdata); + } + } } } #endif _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs