* Updated blender 2.5 default setup
[blender.git] / source / blender / windowmanager / intern / wm.c
index 200d2652af3d145b6885551e7988be7ab79c1b4d..c7c2363216123b12f77358fa16ce318664262467 100644 (file)
@@ -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)
 {