diff options
author | Ton Roosendaal <ton@blender.org> | 2012-12-13 20:21:08 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2012-12-13 20:21:08 +0400 |
commit | 28cd6031405be776bbc6f40397732d8e8efe914d (patch) | |
tree | eeef2e62272ee518a7bdbf8a889fd72bb92c4dc8 /source/blender/windowmanager | |
parent | 02689df6c03ec99a1a957a6c29847952eb233b67 (diff) |
Bugfix - own collection.
Very occasionally Timer Events could still get handled, after stopping
a timer - especially with the timer event still in the queue.
This patch disables such events. Introduced a EVENT_NONE to make sure
it gets ignored everywhere.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 3 | ||||
-rw-r--r-- | source/blender/windowmanager/wm_event_types.h | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 226f4f2aa60..be202a23d33 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -1129,7 +1129,8 @@ void WM_event_remove_timer(wmWindowManager *wm, wmWindow *UNUSED(win), wmTimer * wmEvent *event; for (event = win->queue.first; event; event = event->next) { if (event->customdata == wt) { - //event->customdata = NULL; + event->customdata = NULL; + event->type = EVENT_NONE; /* timer users customdata, dont want NULL == NULL */ } } } diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h index de28cf5409d..c90bbaf8d6c 100644 --- a/source/blender/windowmanager/wm_event_types.h +++ b/source/blender/windowmanager/wm_event_types.h @@ -53,6 +53,8 @@ #define MOUSEX 4 #define MOUSEY 5 +/* non-event, for example disabled timer */ +#define EVENT_NONE 0 /* MOUSE : 0x00x */ #define LEFTMOUSE 1 #define MIDDLEMOUSE 2 |