1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-10-07 22:57:25 -04:00

Improve placement when forcing windowed mode

This is a temporary fix while waiting the for workarea query.

Related to #1106.
This commit is contained in:
Camilla Löwy 2017-11-04 21:14:06 +01:00
parent 31cbb20ba2
commit 7b877c4e24

View File

@ -113,9 +113,11 @@ void _glfwInputMonitor(_GLFWmonitor* monitor, int action, int placement)
{
if (window->monitor == monitor)
{
int width, height;
int width, height, xoff, yoff;
_glfwPlatformGetWindowSize(window, &width, &height);
_glfwPlatformSetWindowMonitor(window, NULL, 0, 0, width, height, 0);
_glfwPlatformGetWindowFrameSize(window, &xoff, &yoff, NULL, NULL);
_glfwPlatformSetWindowPos(window, xoff, yoff);
}
}