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 <campbell@blender.org>2022-03-21 07:44:57 +0300
committerCampbell Barton <campbell@blender.org>2022-03-21 07:49:15 +0300
commit52af3b20d45ea525a0ce66b2613ac132c9032a3f (patch)
treecae3af3eded619f3ad06e92930b23c780ab07ffa /source/blender/windowmanager/intern/wm_window.c
parent8ecaa2d6247df7ff2e50e4a317295078a41cc7fe (diff)
Cleanup: cursor motion events now have value set to KM_NOTHING
In some cases value of cursor motion events was set from the last event written to the wmWindow.eventstate. Avoid potential errors by ensuring cursor motion events always have their value set to KM_NOTHING.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_window.c')
-rw-r--r--source/blender/windowmanager/intern/wm_window.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index cbebb856660..89bb6906a22 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -1215,6 +1215,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr
wmEvent event;
wm_event_init_from_window(win, &event);
event.type = MOUSEMOVE;
+ event.val = KM_NOTHING;
copy_v2_v2_int(event.prev_xy, event.xy);
event.flag = 0;
@@ -1346,6 +1347,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr
/* activate region */
event.type = MOUSEMOVE;
+ event.val = KM_NOTHING;
copy_v2_v2_int(event.prev_xy, event.xy);
event.flag = 0;