diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-03-01 03:51:53 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-03-01 04:00:29 +0300 |
commit | 1638af109e46522a1a24645289016922bb9ca977 (patch) | |
tree | e4099e4c548e437f75a9abe0e560aa7bf89a5daa /source/blender/windowmanager/intern/wm_event_query.c | |
parent | fc08fe82ae5da2c4675ac6a6c1707dce28324d26 (diff) |
WM: don't set event prevval/prevtype on cursor motion
Currently the intended behavior regarding prevval/prevtype isn't
handled consistently. However, including cursor motion causes events
in `wm->queue` and `wm->eventstate` to behave differently,
where `wm->eventstate` ignores motion (necessary for click detection).
This makes checks from `wm->eventstate` to events in the queue fail.
This reverts 39919e35326c732141bfd2d740b19000b6bc1d51,
using the `event.type` instead of it's previous type.
This works as it includes mouse button release events.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_event_query.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_query.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_query.c b/source/blender/windowmanager/intern/wm_event_query.c index ab8f37548b7..2f5332e9672 100644 --- a/source/blender/windowmanager/intern/wm_event_query.c +++ b/source/blender/windowmanager/intern/wm_event_query.c @@ -280,7 +280,8 @@ int WM_event_drag_threshold(const struct wmEvent *event) if (WM_event_is_tablet(event)) { drag_threshold = U.drag_threshold_tablet; } - else if (ISMOUSE(event->prevtype)) { + else if (ISMOUSE(event->type)) { + /* Mouse button or mouse motion. */ drag_threshold = U.drag_threshold_mouse; } else { |