Maximize a window?

nobody wrote on Wednesday, April 05, 2006:

There doesn’t seem to be any info on this in the Reference manual or forums.

How do you maximize a window to cover the desktop? On Win32, glfwGetDesktopMode() returns a very large area (presumably the total desktop surface available (on and off screen). This is pretty useless information, provided by the Win32 API function EnumDisplaySettings(). What I want is the VISIBLE desktop area or at least the current display resolution.
–Nathan

elmindreda wrote on Wednesday, April 05, 2006:

glfwGetDesktopMode() should return what you want, i.e. the current desktop resolution. If it doesn’t then that’s a bug. I’ll have a look at it.

What version of Windows are you using?

There currently isn’t a means to maximise a window. You could partially emulate it with glfwSetWindowPos() and glfwSetWindowSize(), but I’m afraid that’s far from ideal.

nobody wrote on Wednesday, April 05, 2006:

I’m using WinXP SP2.
glfwGetDesktopMode() returns Width = 2009315348 and Height = 4012584

All I want to do is control the size and position of the window relative to the desktop…for instance, centering a window on screen.

Thanks
-Nathan

elmindreda wrote on Wednesday, April 05, 2006:

"Width = 2009315348 and Height = 4012584"

O_o

Wow, that’s broken. I’ll see what I can find.

nobody wrote on Wednesday, April 05, 2006:

Don’t know if this helps, but I tried calling EnumDisplaySettings() directly and it returns the correct desktop resolution.

Please help! My fingers cramp up when I have to use the Windows API! :slight_smile:

-Nathan

elmindreda wrote on Friday, August 18, 2006:

If you still experience this problem, please file a bug report in the bug tracker, with all the details you think are relevant to the problem. Thanks.