diff options
author | Matt Ebb <matt@mke3.net> | 2009-05-30 11:26:45 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2009-05-30 11:26:45 +0400 |
commit | c41f8ea2ad9d2ec951cc978e44839460cd8f1f3a (patch) | |
tree | 5ba640905b5c1a8452e5618fd0c3416f2513f5cc /source/blender/windowmanager/intern | |
parent | 829fb38ac31d1ebac7f92e80f9ac43d7300a0d11 (diff) |
* 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 :)
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r-- | source/blender/windowmanager/intern/wm.c | 12 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 4 |
2 files changed, 7 insertions, 9 deletions
diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c index c7c23632161..37fdc9fa2c5 100644 --- a/source/blender/windowmanager/intern/wm.c +++ b/source/blender/windowmanager/intern/wm.c @@ -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; + } } diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 0e6681b134d..d13d8ec6ccc 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -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 */ |