Fix #20113: CLICK events stop working when opening a new file.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 14 Dec 2009 19:39:54 +0000 (19:39 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 14 Dec 2009 19:39:54 +0000 (19:39 +0000)
source/blender/windowmanager/intern/wm_event_system.c

index 906a166a28c664d70a6068dd4da5907e51ab759e..710f9897c94f0dace6e8013f203e1d055c8e95b3 100644 (file)
@@ -828,7 +828,7 @@ static int wm_eventmatch(wmEvent *winevent, wmKeyMapItem *kmi)
 static int wm_event_always_pass(wmEvent *event)
 {
        /* some events we always pass on, to ensure proper communication */
-       return ELEM5(event->type, TIMER, TIMER0, TIMER1, TIMER2, WINDEACTIVATE);
+       return ISTIMER(event->type) || (event->type == WINDEACTIVATE);
 }
 
 /* operator exists */
@@ -1367,8 +1367,8 @@ void wm_event_do_handlers(bContext *C)
                        }
                        
                        /* store last event for this window */
-                       /* mousemove event don't overwrite last type */
-                       if (event->type != MOUSEMOVE) {
+                       /* mousemove and timer events don't overwrite last type */
+                       if (event->type != MOUSEMOVE && !ISTIMER(event->type)) {
                                if (wm_action_not_handled(action)) {
                                        if (win->last_type == event->type) {
                                                /* set click time on first click (press -> release) */