LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: renanse on September 09, 2004, 17:13:53

Title: window position
Post by: renanse on September 09, 2004, 17:13:53
I mentioned this to Matzon on IM, but just to bug as many people as possible...  :wink:

I gather there is no longer a way to position a new window...  Seems like position (the initial position) should be a necessary attribute.  Would it be possible to change the default to having the window centered on the screen at the very least?  

When refactoring jME to use LWJGL .92, losing that ability to have the window centered in windowed mode made a lot of developers protest.  :(  Yeah, I understand you can use SWT or something like that to do this now, but who wants to force inclusion of the swt library just for position support!
Title: window position
Post by: elias on September 09, 2004, 18:12:54
Well, it's not always that easy. On linux, the position was ignored by most window managers anyway (they have their own idea of where to place the window).

- elias
Title: window position
Post by: PeterM on September 10, 2004, 14:42:52
I agree with renanse. How about on the linux port the window manager decides, and on the windows one it's centred? (Remember to adjust the window rect to take into account its border and title bar using AdjustRect).

I'm not sure how window management works on macs.
Title: window position
Post by: Matzon on September 10, 2004, 15:25:19
we're going to add a setLocation(x,y) to Display one of the next days