Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-04-16 16:46:21 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-04-16 16:50:05 +0300
commit7bbead1e87254623deed56f588e65f524d14343b (patch)
treefc189b75c782aa10348dae5e77d5e2fb560858c0 /source/blender/makesdna/DNA_windowmanager_types.h
parent278b19745b9d8d8f108f98d7686d0366fbbde736 (diff)
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.
Diffstat (limited to 'source/blender/makesdna/DNA_windowmanager_types.h')
-rw-r--r--source/blender/makesdna/DNA_windowmanager_types.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index 130b308f224..59091fec4b8 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -278,8 +278,14 @@ typedef struct wmWindow {
char event_queue_check_click;
/** Enable when #KM_PRESS events are not handled (keyboard/mouse-buttons only). */
char event_queue_check_drag;
+ /**
+ * Enable when the drag was handled,
+ * to avoid mouse-motion continually triggering drag events which are not handled
+ * but add overhead to gizmo handling (for example), see T87511.
+ */
+ char event_queue_check_drag_handled;
- char _pad0[2];
+ char _pad0[1];
/** Internal, lock pie creation from this event until released. */
short pie_event_type_lock;