diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-02 17:26:51 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-02 17:36:14 +0300 |
commit | 13b6cec039681db40e677463aa9fdff6d55896aa (patch) | |
tree | 706b49d0089626687d9f50acbd63faae5010b0d3 /source/blender/windowmanager | |
parent | 3a0df7d37bcf55b2b0f9a070d5c80f908e46ebc4 (diff) |
Fix/Workaround T96120: Crash dropping from the file browser
Since removal of tweak events 4986f718482b061082936f1f6aa13929741093a2,
box-select is activating while dragging files.
As far as I can tell this used to work because of differences
int the order tweak / click-drag events are handled.
Apply a workaround since dragging files doesn't prevent other parts
of the UI from activated (it's possible to open menus for e.g),
this is something we will likely want to limit which would resolve
this bug too.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_gesture_ops.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_gesture_ops.c b/source/blender/windowmanager/intern/wm_gesture_ops.c index 1fdc8bbe2c8..ce924ef546c 100644 --- a/source/blender/windowmanager/intern/wm_gesture_ops.c +++ b/source/blender/windowmanager/intern/wm_gesture_ops.c @@ -162,6 +162,13 @@ static bool gesture_box_apply(bContext *C, wmOperator *op) int WM_gesture_box_invoke(bContext *C, wmOperator *op, const wmEvent *event) { + /* FIXME(@campbellbarton): This is a temporary workaround T96120. As events + * are handled while dragging we should resolve this in a more general way. */ + wmWindowManager *wm = CTX_wm_manager(C); + if (wm->drags.first) { + return OPERATOR_PASS_THROUGH; + } + wmWindow *win = CTX_wm_window(C); const ARegion *region = CTX_wm_region(C); const bool wait_for_input = !WM_event_is_mouse_drag_or_press(event) && |