From ec6f0811a0a1b0c67aacda2d010f1f9c7b8a4cd2 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Mon, 8 Jun 2015 16:12:47 +0200 Subject: [PATCH] Improved initial placement of full screen windows. --- src/win32_window.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/win32_window.c b/src/win32_window.c index 7cb94a30..eb2b117d 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -655,14 +655,17 @@ static int createWindow(_GLFWwindow* window, int xpos, ypos, fullWidth, fullHeight; WCHAR* wideTitle; - if (window->monitor) + if (wndconfig->monitor) { + GLFWvidmode mode; + // NOTE: This window placement is temporary and approximate, as the // correct position and size cannot be known until the monitor // video mode has been set _glfwPlatformGetMonitorPos(wndconfig->monitor, &xpos, &ypos); - fullWidth = wndconfig->width; - fullHeight = wndconfig->height; + _glfwPlatformGetVideoMode(wndconfig->monitor, &mode); + fullWidth = mode.width; + fullHeight = mode.height; } else {