2.5
authorTon Roosendaal <ton@blender.org>
Sun, 14 Dec 2008 19:04:20 +0000 (19:04 +0000)
committerTon Roosendaal <ton@blender.org>
Sun, 14 Dec 2008 19:04:20 +0000 (19:04 +0000)
Small fix: in the ghost part of WM event handling, a function was
setting 'active subwindow' and registering headers to be drawn active
for this or not. It should be nicely inside the handler queue, so
it doesnt get executed on modal window-handlers.

(This solves flashing area headers while dragging area edges)

Still needed to resolve how screen handling goes... via handlers
with operators? On my list to keep track of. :)

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

index e74e1e113fd02f872b910a9b0918c2ef20e550a8..1c0b8932d94b53df9d3ced7ca7d4508e795b9613 100644 (file)
@@ -1026,10 +1026,6 @@ void ED_screen_set_subwinactive(wmWindow *win)
                ScrArea *sa;
                int oldswin= win->screen->subwinactive;
                
-               /* XXX prevent this call for modal menus now */
-               if(win->screen->regionbase.first)
-                       return;
-               
                for(sa= win->screen->areabase.first; sa; sa= sa->next) {
                        if(event->x > sa->totrct.xmin && event->x < sa->totrct.xmax)
                                if(event->y > sa->totrct.ymin && event->y < sa->totrct.ymax)
index db8ef82a5b0124dcae0a9c6b8ee2715f1125ed1f..cb45f1a2680216b08d45b0271598adfa3ced77f5 100644 (file)
@@ -277,7 +277,6 @@ static int screen_cursor_test(bContext *C, wmOperator *op, wmEvent *event)
                } else {
                        WM_set_cursor(C, CURSOR_X_MOVE);
                }
-               return OPERATOR_FINISHED;
        } 
        else {
                ScrArea *sa= NULL;
index 88c29ddae29a88e508a846f2c2840360d7db7c1e..cd66d0b479b622963505905c1b1d6d6ce8afe5bb 100644 (file)
@@ -635,14 +635,16 @@ void wm_event_do_handlers(bContext *C)
                        
                        /* MVC demands to not draw in event handlers... for now we leave it */
                        wm_window_make_drawable(C, win);
-                               
+                       
                        action= wm_handlers_do(C, event, &win->handlers);
                        
                        if(wm_event_always_pass(event) || action==WM_HANDLER_CONTINUE) {
                                ScrArea *sa;
                                ARegion *ar;
                                int doit= 0;
-
+                               
+                               ED_screen_set_subwinactive(win);        /* state variables in screen */
+                               
                                for(sa= win->screen->areabase.first; sa; sa= sa->next) {
                                        if(wm_event_always_pass(event) || wm_event_prev_inside_i(event, &sa->totrct)) {
                                                doit= 1;
@@ -896,8 +898,6 @@ void wm_event_add_ghostevent(wmWindow *win, int type, void *customdata)
                                event.x= evt->x= cx;
                                event.y= evt->y= (win->sizey-1) - cy;
                                
-                               ED_screen_set_subwinactive(win);        /* state variables in screen */
-                               
                                update_tablet_data(win, &event);
                                wm_event_add(win, &event);
                        }