Applying consistent default window behavior across platforms.

Now all windows open in a border as opposed to fullscreen.  blender -W restores
old functionality, blender -w is now default.  This lets each platform's window
manager deal with it's own issues.

As per issue 6391 in the patch tracker.
This commit is contained in:
D.J. Capelis 2007-04-12 06:21:31 +00:00
parent 1e5bdbcb2f
commit 7470e7efa0
3 changed files with 11 additions and 31 deletions

@ -2191,15 +2191,10 @@ static bScreen *addscreen(char *name) /* use setprefsize() if you want somethin
sc->scene= G.scene;
if (!mainwin) {
#if 0
//#ifdef _WIN32 // FULLSCREEN
if (G.windowstate == G_WINDOWSTATE_FULLSCREEN)
mainwin= window_open("Blender", sc->startx, sc->starty, sc->sizex, sc->sizey, G_WINDOWSTATE_FULLSCREEN);
else
mainwin= window_open("Blender", sc->startx, sc->starty, sc->sizex, sc->sizey, start_maximized);
#else
mainwin= window_open("Blender", sc->startx, sc->starty, sc->sizex, sc->sizey, start_maximized);
#endif
if (!mainwin) {
printf("ERROR: Unable to open Blender window\n");

@ -338,20 +338,12 @@ Window *window_open(char *title, int posx, int posy, int sizex, int sizey, int s
winlay_get_screensize(&scr_w, &scr_h);
posy= (scr_h-posy-sizey);
/* create a fullscreen window on unix by default*/
#if !defined(WIN32) && !defined(__APPLE__)
inital_state= start_maximized?
GHOST_kWindowStateFullScreen:GHOST_kWindowStateNormal;
#else
#ifdef _WIN32 // FULLSCREEN
// if (start_maximized == G_WINDOWSTATE_FULLSCREEN)
// inital_state= GHOST_kWindowStateFullScreen;
// else
inital_state= start_maximized?GHOST_kWindowStateMaximized:GHOST_kWindowStateNormal;
#else // APPLE
inital_state= start_maximized?GHOST_kWindowStateMaximized:GHOST_kWindowStateNormal;
if (start_maximized == G_WINDOWSTATE_FULLSCREEN)
inital_state = start_maximized?GHOST_kWindowStateFullScreen:GHOST_kWindowStateNormal;
else
inital_state = start_maximized?GHOST_kWindowStateMaximized:GHOST_kWindowStateNormal;
#ifdef __APPLE__
inital_state += macPrefState;
#endif
#endif
ghostwin= GHOST_CreateWindow(g_system,

@ -195,10 +195,8 @@ static void print_help(void)
printf (" -m\t\tRead from disk (Don't buffer)\n");
printf ("\nWindow options:\n");
printf (" -w\t\tForce opening with borders\n");
#ifdef WIN32
printf (" -w\t\tForce opening with borders (default)\n");
printf (" -W\t\tForce opening without borders\n");
#endif
printf (" -p <sx> <sy> <w> <h>\tOpen with lower left corner at <sx>, <sy>\n");
printf (" \tand width and height <w>, <h>\n");
printf ("\nGame Engine specific options:\n");
@ -391,7 +389,7 @@ int main(int argc, char **argv)
/* for all platforms, even windos has it! */
if(G.background) signal(SIGINT, blender_esc); /* ctrl c out bg render */
/* background render uses this font too */
/* background render uses this font too */
BKE_font_register_builtin(datatoc_Bfont, datatoc_Bfont_size);
init_def_material();
@ -437,20 +435,15 @@ int main(int argc, char **argv)
*/
winlay_get_screensize(&sizx, &sizy);
setprefsize(0, 0, sizx, sizy);
#if 0
//#ifdef _WIN32 // FULLSCREEN
G.windowstate = G_WINDOWSTATE_BORDER;
#endif
break;
case 'W':
/* XXX, fixme zr, borderless on win32 */
#if 0
//#ifdef _WIN32 // FULLSCREEN
/* XXX, fixme zr, borderless on win32 */
/* now on all platforms as of 20070411 - DJC */
G.windowstate = G_WINDOWSTATE_FULLSCREEN;
#endif
break;
case 'R':
/* Registering filetypes only makes sense on windows... */
/* Registering filetypes only makes sense on windows... */
#ifdef WIN32
RegisterBlendExtension(argv[0]);
#endif
@ -461,7 +454,7 @@ int main(int argc, char **argv)
/**
notify the gameengine that no audio is wanted, even if the user didn't give
the flag -g noaudio.
*/
*/
SYS_WriteCommandLineInt(syshandle,"noaudio",1);
audio = 0;