From 7bbead1e87254623deed56f588e65f524d14343b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 16 Apr 2021 23:46:21 +1000 Subject: WM: prevent drag events being continually tested Click-drag events that weren't handled would continually be tested for each mouse-motion event. As well as being redundant, this added the overhead of querying gizmos twice per motion event. Now click-drag is only tested once when the drag threshold is reached. This mitigates T87511, although the single drag test still causes the snap gizmo to flicker. --- source/blender/windowmanager/intern/wm.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/windowmanager/intern/wm.c') diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c index ae5b6c468f7..46e47ae95c4 100644 --- a/source/blender/windowmanager/intern/wm.c +++ b/source/blender/windowmanager/intern/wm.c @@ -186,6 +186,7 @@ static void window_manager_blend_read_data(BlendDataReader *reader, ID *id) win->addmousemove = true; win->event_queue_check_click = 0; win->event_queue_check_drag = 0; + win->event_queue_check_drag_handled = 0; BLO_read_data_address(reader, &win->stereo3d_format); /* Multi-view always fallback to anaglyph at file opening -- cgit v1.2.3