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-03-01 03:51:53 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-03-01 04:00:29 +0300
commit1638af109e46522a1a24645289016922bb9ca977 (patch)
treee4099e4c548e437f75a9abe0e560aa7bf89a5daa /source/blender/windowmanager/intern/wm_event_query.c
parentfc08fe82ae5da2c4675ac6a6c1707dce28324d26 (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.c3
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 {