Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2009-05-30 08:16:24 +0400
committerMatt Ebb <matt@mke3.net>2009-05-30 08:16:24 +0400
commitb36eb7e4522eab4f73a0b25a1c2c9130e17b7b5e (patch)
tree5876a897144b7495efbe0ed02b387ed28b8e4d5e /source/blender/windowmanager/intern
parent688b7c73ad42148bfa946a195549c4fc6b38c266 (diff)
* Updated blender 2.5 default setup
Simplified and started from a clean slate, without much of the hidden existing space data that was hanging around in the old one. One issue I found is that saving the startup file from Blender 2.5 also saves the window size and location. This means the version I just saved would open up strangely on other screen sizes/setups. I added code to reset this to default when loading it up from the version compiled into the Blender binary, but perhaps Ton/ Brecht might want to check the diff.
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r--source/blender/windowmanager/intern/wm.c24
-rw-r--r--source/blender/windowmanager/intern/wm_files.c1
2 files changed, 25 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c
index 200d2652af3..c7c23632161 100644
--- a/source/blender/windowmanager/intern/wm.c
+++ b/source/blender/windowmanager/intern/wm.c
@@ -30,6 +30,8 @@
#include "MEM_guardedalloc.h"
+#include "GHOST_C-api.h"
+
#include "BLI_blenlib.h"
#include "BKE_blender.h"
@@ -121,6 +123,28 @@ void wm_check(bContext *C)
}
}
+void wm_clear_default_size(bContext *C)
+{
+ wmWindowManager *wm= CTX_wm_manager(C);
+ wmWindow *win;
+
+ /* wm context */
+ if(wm==NULL) {
+ wm= CTX_data_main(C)->wm.first;
+ CTX_wm_manager_set(C, wm);
+ }
+ 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;
+
+}
+
/* on startup, it adds all data, for matching */
void wm_add_default(bContext *C)
{
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 6bd5b9e0c6c..283428394af 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -309,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);
+ wm_clear_default_size(C);
}
/* match the read WM with current WM */