Fix [#21868] Header flickering when mouse moves over region borders
authorMatt Ebb <matt@mke3.net>
Fri, 2 Apr 2010 05:46:05 +0000 (05:46 +0000)
committerMatt Ebb <matt@mke3.net>
Fri, 2 Apr 2010 05:46:05 +0000 (05:46 +0000)
Patch by Elia Sarti, thanks!

source/blender/editors/screen/screen_edit.c

index 435201f506e08ff5101af55033655071b4bcd845..d8531d0b4e9ac43e2179168a5ffc5d6eaf9ead36 100644 (file)
@@ -1232,11 +1232,17 @@ void ED_screen_set_subwinactive(wmWindow *win, wmEvent *event)
 
 int ED_screen_area_active(const bContext *C)
 {
+       wmWindow *win= CTX_wm_window(C);
        bScreen *sc= CTX_wm_screen(C);
        ScrArea *sa= CTX_wm_area(C);
 
-       if(sc && sa) {
+       if(win && sc && sa) {
+               AZone *az= is_in_area_actionzone(sa, win->eventstate->x, win->eventstate->y);
                ARegion *ar;
+               
+               if (az && az->type == AZONE_REGION)
+                       return 1;
+               
                for(ar= sa->regionbase.first; ar; ar= ar->next)
                        if(ar->swinid == sc->subwinactive)
                                return 1;