Initial window position

In SDL 1.2.7, the initial window position appears to be based on the current
mouse position (which, from the user’s point of view, is random). I know that
Linux has all kinds of window managers that make window positioning painful,
but on Windows and OS X at least it would be nice to have the initial window
centered. It would also be nice to have a platform-independent API for moving
the window after it is created, but initial position is sufficient for most
applications.

-m=====
Morgan McGuire
@Morgan_McGuire


Do you Yahoo!?
Yahoo! Search - Find what you?re looking for faster
http://search.yahoo.com

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

positioning painful, but on Windows and OS X at least it would be nice to
have the initial window centered. It would also be nice to have a
platform-independent API for moving the window after it is created, but
initial position is sufficient for most applications.

To center your window set the SDL_VIDEO_CENTERED[1] variable:

setenv(“SDL_VIDEO_CENTERED”, “SDL_VIDEO_CENTERED”, 1);

Of course you already knew that since you’ve read through SDL’s
documentation[2] several times, right?

  • -Juan D. Espinoza

"Happiness makes up in height for what it lacks in length."
Rober Frost

[1] http://sdldoc.csn.ul.ie/sdlenvvars.php
[2] http://sdldoc.csn.ul.ie/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFASJioD1KpJUG76rERAki6AJ97w5mljMAaZsJ9gZGxf2l8LW5nUQCbBBNe
5ILIovaVGrGtK9vSfjylhs4=
=3/2l
-----END PGP SIGNATURE-----

I would say that instead of having the window centered at startup it would
be nice to be able to tell the window where to place itself. Centered could
be predefined, and if you wanted to you could tell the window where to place
it top-left corner…

/Daniel Liljeberg> ----- Original Message -----

From: morgan3d@yahoo.com (Morgan McGuire)
To:
Sent: Friday, March 05, 2004 2:01 PM
Subject: [SDL] Initial window position

In SDL 1.2.7, the initial window position appears to be based on the
current
mouse position (which, from the user’s point of view, is random). I know
that
Linux has all kinds of window managers that make window positioning
painful,
but on Windows and OS X at least it would be nice to have the initial
window
centered. It would also be nice to have a platform-independent API for
moving
the window after it is created, but initial position is sufficient for
most
applications.

-m

=====
Morgan McGuire
morgan3d at yahoo.com


Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

SDL_VIDEO_WINDOW_POS=x,y
putenv(“SDL_VIDEO_WINDOW_POS=10,10”);On Friday 05 March 2004 6:52 am, DAMiEN wrote:

I would say that instead of having the window centered at startup it would
be nice to be able to tell the window where to place itself. Centered could
be predefined, and if you wanted to you could tell the window where to
place it top-left corner…

/Daniel Liljeberg

----- Original Message -----
From: “Morgan McGuire”
To:
Sent: Friday, March 05, 2004 2:01 PM
Subject: [SDL] Initial window position

In SDL 1.2.7, the initial window position appears to be based on the

current

mouse position (which, from the user’s point of view, is random). I know

that

Linux has all kinds of window managers that make window positioning

painful,

but on Windows and OS X at least it would be nice to have the initial

window

centered. It would also be nice to have a platform-independent API for

moving

the window after it is created, but initial position is sufficient for

most

applications.

-m

=====
Morgan McGuire
morgan3d at yahoo.com


Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl