Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLFW_MAXIMIZED hint not working on Windows in version 3.3 #1499

Open
dougbinks opened this issue Jun 13, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@dougbinks
Copy link
Contributor

commented Jun 13, 2019

Reported on our forums in post Maximising Window differences from 3.2 to 3.3 .

I have confirmed the issue and have a fix in testing which I'll create a PR for shortly, however this turns out to be a slightly complex and subtle area.

Details

When the window hint GLFW_MAXIMIZED is set to GLFW_TRUE and a window is created it appears with maximized style but not with a maximized size.

It should instead appear maximized as well as in the maximized style.

Notes

Related to issue #780.

@dougbinks

This comment has been minimized.

Copy link
Contributor Author

commented Jun 13, 2019

The simplest solution I can see is to alter _glfwPlatformShowWindow() to:

void _glfwPlatformShowWindow(_GLFWwindow* window)
{
	if (window->win32.maximized)
		ShowWindow(window->win32.handle, SW_MAXIMIZE);
	else
		ShowWindow(window->win32.handle, SW_SHOWNA);
}

Currently this means any maximized window would then be focused, as SW_MAXIMIZE will activate the window and there is no maximize without activate option that I can see. This makes sense as a newly created maximized window would cover all other windows.

dougbinks added a commit to dougbinks/glfw that referenced this issue Jun 14, 2019

@elmindreda elmindreda self-assigned this Jun 17, 2019

@elmindreda elmindreda added this to the 3.3.1 milestone Jun 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.