* fix for resetting window size on builtin b.blend startup.

I think this should work ok for now, but would really appreciate someone who knows the windowmanager code well to take a look at it  :)
This commit is contained in:
Matt Ebb 2009-05-30 07:26:45 +00:00
parent 829fb38ac3
commit c41f8ea2ad
2 changed files with 7 additions and 9 deletions

@ -136,12 +136,12 @@ void wm_clear_default_size(bContext *C)
if(wm==NULL) return;
if(wm->windows.first==NULL) return;
win = wm->windows.first;
win->sizex = 0;
win->sizey = 0;
win->posx = 0;
win->posy = 0;
win->windowstate= GHOST_kWindowStateMaximized;
for(win= wm->windows.first; win; win= win->next) {
win->sizex = 0;
win->sizey = 0;
win->posx = 0;
win->posy = 0;
}
}

@ -302,9 +302,6 @@ int WM_read_homefile(bContext *C, wmOperator *op)
/* prevent loading no UI */
G.fileflags &= ~G_FILE_NO_UI;
if (from_memory)
wm_clear_default_size(C);
/* put aside screens to match with persistant windows later */
wm_window_match_init(C, &wmbase);
@ -312,6 +309,7 @@ int WM_read_homefile(bContext *C, wmOperator *op)
success = BKE_read_file(C, tstr, NULL, NULL);
} else {
success = BKE_read_file_from_memory(C, datatoc_B_blend, datatoc_B_blend_size, NULL, NULL);
if (wmbase.first == NULL) wm_clear_default_size(C);
}
/* match the read WM with current WM */