Fixed iconification event for maximized windows.

This commit is contained in:
Camilla Berglund 2015-01-06 15:35:49 +01:00
parent 9ec1a4361b
commit dcc78017b0
2 changed files with 10 additions and 2 deletions

View File

@ -159,6 +159,7 @@ typedef struct _GLFWwindowWin32
DWORD dwExStyle;
GLboolean cursorInside;
GLboolean iconified;
// The last received cursor position, regardless of source
int cursorPosX, cursorPosY;

View File

@ -489,10 +489,17 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
updateClipRect(window);
}
if (wParam == SIZE_MINIMIZED)
if (!window->win32.iconified && wParam == SIZE_MINIMIZED)
{
window->win32.iconified = GL_TRUE;
_glfwInputWindowIconify(window, GL_TRUE);
else if (wParam == SIZE_RESTORED)
}
else if (window->win32.iconified &&
(wParam == SIZE_RESTORED || wParam == SIZE_MAXIMIZED))
{
window->win32.iconified = GL_FALSE;
_glfwInputWindowIconify(window, GL_FALSE);
}
_glfwInputFramebufferSize(window, LOWORD(lParam), HIWORD(lParam));
_glfwInputWindowSize(window, LOWORD(lParam), HIWORD(lParam));