2.5: File browser
[blender.git] / source / blender / windowmanager / intern / wm_event_system.c
index e707d096a6019d0945f31520bd3e17f246846bd8..c75feafe6231cea21fd09f0603e5f24abb99f662 100644 (file)
@@ -885,10 +885,22 @@ static int handler_boundbox_test(wmEventHandler *handler, wmEvent *event)
                if(handler->bblocal) {
                        rcti rect= *handler->bblocal;
                        BLI_translate_rcti(&rect, handler->bbwin->xmin, handler->bbwin->ymin);
-                       return BLI_in_rcti(&rect, event->x, event->y);
+
+                       if(BLI_in_rcti(&rect, event->x, event->y))
+                               return 1;
+                       else if(event->type==MOUSEMOVE && BLI_in_rcti(&rect, event->prevx, event->prevy))
+                               return 1;
+                       else
+                               return 0;
+               }
+               else {
+                       if(BLI_in_rcti(handler->bbwin, event->x, event->y))
+                               return 1;
+                       else if(event->type==MOUSEMOVE && BLI_in_rcti(handler->bbwin, event->prevx, event->prevy))
+                               return 1;
+                       else
+                               return 0;
                }
-               else 
-                       return BLI_in_rcti(handler->bbwin, event->x, event->y);
        }
        return 1;
 }