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:
Diffstat (limited to 'source/blender/windowmanager/intern/wm.c')
-rw-r--r--source/blender/windowmanager/intern/wm.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c
index 200d2652af3..37fdc9fa2c5 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;
+
+ for(win= wm->windows.first; win; win= win->next) {
+ win->sizex = 0;
+ win->sizey = 0;
+ win->posx = 0;
+ win->posy = 0;
+ }
+
+}
+
/* on startup, it adds all data, for matching */
void wm_add_default(bContext *C)
{