[Bf-blender-cvs] [e6065ce5f2c] temp-workspace-multi-window: Make fullscreen toggling work again
Julian Eisel
noreply at git.blender.org
Thu Mar 9 14:54:00 CET 2017
Commit: e6065ce5f2cb95c72b823fbe7d583a7e8b96f8d0
Author: Julian Eisel
Date: Thu Mar 9 14:51:48 2017 +0100
Branches: temp-workspace-multi-window
https://developer.blender.org/rBe6065ce5f2cb95c72b823fbe7d583a7e8b96f8d0
Make fullscreen toggling work again
This still creates a new screen which would be nice to avoid, but quite
some logic depends on the creation of this screen, so leaving it there
for now.
===================================================================
M source/blender/editors/workspace/screen_edit.c
===================================================================
diff --git a/source/blender/editors/workspace/screen_edit.c b/source/blender/editors/workspace/screen_edit.c
index 4cecaad74ce..de2c7c8b3a5 100644
--- a/source/blender/editors/workspace/screen_edit.c
+++ b/source/blender/editors/workspace/screen_edit.c
@@ -1468,7 +1468,7 @@ ScrArea *ED_screen_state_toggle(bContext *C, wmWindow *win, ScrArea *sa, const s
ED_screen_change(C, sc);
- BKE_workspace_layout_remove(workspace, layout_old, CTX_data_main(C));
+ ED_workspace_layout_delete(C, win, workspace, layout_old);
/* After we've restored back to SCREENNORMAL, we have to wait with
* screen handling as it uses the area coords which aren't updated yet.
@@ -1478,7 +1478,6 @@ ScrArea *ED_screen_state_toggle(bContext *C, wmWindow *win, ScrArea *sa, const s
}
else {
/* change from SCREENNORMAL to new state */
- WorkSpaceLayout *layout_new;
ScreenLayoutData layout_data;
ScrArea *newa;
char newname[MAX_ID_NAME - 2];
@@ -1490,9 +1489,9 @@ ScrArea *ED_screen_state_toggle(bContext *C, wmWindow *win, ScrArea *sa, const s
BLI_snprintf(newname, sizeof(newname), "%s-%s", oldscreen->id.name + 2, "nonnormal");
ED_workspace_layout_add(workspace, &wm->windows, newname, layout_data);
- layout_new = BKE_workspace_hook_active_layout_get(win->workspace_hook);
+ sc = WM_window_get_active_screen(win);
+ ED_workspace_layout_make_single_area(sc, win->sizex, win->sizey);
- sc = BKE_workspace_layout_screen_get(layout_new);
sc->state = state;
sc->redraws_flag = oldscreen->redraws_flag;
sc->temp = oldscreen->temp;
More information about the Bf-blender-cvs
mailing list