2.5
authorTon Roosendaal <ton@blender.org>
Wed, 17 Dec 2008 15:51:32 +0000 (15:51 +0000)
committerTon Roosendaal <ton@blender.org>
Wed, 17 Dec 2008 15:51:32 +0000 (15:51 +0000)
Small commit, too much fun to not do separately:

- removed notifier restriction to go only to own window, so multiwindow
  setups redraw correctly. (when other windows show other scenes we have
  to handle still).
- fixed cursor type outside of window (got stuck to area-move cursor).

source/blender/editors/screen/screen_edit.c
source/blender/windowmanager/intern/wm_event_system.c

index a8cd6b7203c15b5e15afc1c3f4c0280e71de047c..13c0f545a8ac1017cab424541b2077a751219ec9 100644 (file)
@@ -1052,7 +1052,7 @@ void ED_screen_exit(bContext *C, wmWindow *window, bScreen *screen)
        C->window= prevwin;
 }
 
-/* case when on area-edge or in azones */
+/* case when on area-edge or in azones, or outside window */
 static void screen_cursor_set(wmWindow *win, wmEvent *event)
 {
        ScrArea *sa;
@@ -1067,11 +1067,14 @@ static void screen_cursor_set(wmWindow *win, wmEvent *event)
        else {
                ScrEdge *actedge= screen_find_active_scredge(win->screen, event->x, event->y);
                
-               if (actedge && scredge_is_horizontal(actedge)) {
-                       WM_cursor_set(win, CURSOR_Y_MOVE);
-               } else {
-                       WM_cursor_set(win, CURSOR_X_MOVE);
+               if (actedge) {
+                       if(scredge_is_horizontal(actedge))
+                               WM_cursor_set(win, CURSOR_Y_MOVE);
+                       else
+                               WM_cursor_set(win, CURSOR_X_MOVE);
                }
+               else
+                       WM_cursor_set(win, CURSOR_STD);
        } 
 }
 
index 74f3fd33f29327c29880b6925678718f90c400bf..5cc28ec45d88151b84174257fd955d13c1d2c34d 100644 (file)
@@ -130,11 +130,6 @@ void wm_event_do_notifiers(bContext *C)
 
                        C->window= win;
                        C->screen= win->screen; /* XXX context in notifiers? */
-                       
-                       if(note->window && note->window!=win)
-                               continue;
-                       if(win->screen==NULL)
-                               continue;
 
                        /* printf("notifier win %d screen %s\n", win->winid, win->screen->id.name+2); */
                        ED_screen_do_listen(win, note);