Fix another fullscreen toggle glitch
authorJulian Eisel <eiseljulian@gmail.com>
Thu, 28 May 2015 17:48:28 +0000 (19:48 +0200)
committerJulian Eisel <eiseljulian@gmail.com>
Thu, 28 May 2015 17:48:28 +0000 (19:48 +0200)
Steps to reproduce were: Set 3DView to fullscreen->render->toggle out of
fullscreen->escape->Area doesn't change back to 3DView

source/blender/editors/render/render_view.c

index fe357a7a0e24ebcc520cb96a293a95e713e9200b..f529c93c81c47063d3a2ffbf42dc9f2166b6094b 100644 (file)
@@ -245,6 +245,11 @@ static int render_view_cancel_exec(bContext *C, wmOperator *UNUSED(op))
        ScrArea *sa = CTX_wm_area(C);
        SpaceImage *sima = sa->spacedata.first;
 
+       /* ensure image editor fullscreen and area fullscreen states are in sync */
+       if ((sima->flag & SI_FULLWINDOW) && !sa->full) {
+               sima->flag &= ~SI_FULLWINDOW;
+       }
+
        /* test if we have a temp screen in front */
        if (win->screen->temp) {
                wm_window_lower(win);
@@ -258,8 +263,9 @@ static int render_view_cancel_exec(bContext *C, wmOperator *UNUSED(op))
                        sima->flag &= ~SI_FULLWINDOW;
                        ED_screen_full_prevspace(C, sa);
                }
-               else
+               else {
                        ED_area_prevspace(C, sa);
+               }
 
                return OPERATOR_FINISHED;
        }