maximize blender window on startup on os x
authorStefan Gartner <stefang@aon.at>
Tue, 13 May 2003 12:14:52 +0000 (12:14 +0000)
committerStefan Gartner <stefang@aon.at>
Tue, 13 May 2003 12:14:52 +0000 (12:14 +0000)
source/creator/creator.c

index 57e4d9c91463d7f39dd7f5c47d90b9eb71f0740d..34175d042898e08dc7dce760a2bd1db088bfe151 100644 (file)
@@ -194,19 +194,22 @@ int main(int argc, char **argv)
        if (argc==2 && strncmp(argv[1], "-psn_", 5)==0) {
                extern int GHOST_HACK_getFirstFile(char buf[]);
                static char firstfilebuf[512];
-               int scr_x,scr_y;
                
                argc= 1;
                
-               setprefsize(100, 100, 800, 600);
-               
-               winlay_get_screensize(&scr_x, &scr_y);
-               winlay_process_events(0);
                if (GHOST_HACK_getFirstFile(firstfilebuf)) {
                        argc= 2;
                        argv[1]= firstfilebuf;
                }
        }
+
+       winlay_get_screensize(&sizx, &sizy);
+       
+       /* make the main windows slightly smaller than the screen,
+        * to prevent it from hiding behind the menu bar */
+       setprefsize(0, 0, sizx, sizy-45);
+       
+       winlay_process_events(0);
 #endif
 
 #ifdef __FreeBSD__