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:
authorNathan Letwory <nathan@letworyinteractive.com>2010-10-15 13:30:33 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2010-10-15 13:30:33 +0400
commit9ecf7c15a5c705b2ab336a7ea7e39f4b25006e8b (patch)
tree021ca214c44570b0c0bb352c42932d24b2bf4466 /source/blender/windowmanager
parent572faf9e7a589e1712fa0a95223d5c8a180a5a2c (diff)
Fix for r32487: the logic was suboptimal, improved to always work correctly.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_window.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 3600267dabc..f791cb1667a 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -68,7 +68,7 @@ GHOST_SystemHandle g_system= NULL;
/* set by commandline */
static int prefsizx= 0, prefsizy= 0, prefstax= 0, prefstay= 0, initialstate= GHOST_kWindowStateNormal;
-static int prefsizeused = 0;
+static unsigned short useprefsize= 0;
/* ******** win open & close ************ */
@@ -373,13 +373,13 @@ void wm_window_add_ghostwindows(bContext* C, wmWindowManager *wm)
for(win= wm->windows.first; win; win= win->next) {
if(win->ghostwin==NULL) {
- if(win->sizex==0 || prefsizeused==0) {
+ if(win->sizex==0 || useprefsize) {
win->posx= prefstax;
win->posy= prefstay;
win->sizex= prefsizx;
win->sizey= prefsizy;
win->windowstate= initialstate;
- prefsizeused= 1;
+ useprefsize= 0;
}
wm_window_add_ghostwindow(C, wm, "Blender", win);
}
@@ -1111,6 +1111,7 @@ void WM_setprefsize(int stax, int stay, int sizx, int sizy)
prefstay= stay;
prefsizx= sizx;
prefsizy= sizy;
+ useprefsize= 1;
}
/* for borderless and border windows set from command-line */