Fixed focus for Win+D window restoration.

This commit is contained in:
Camilla Berglund
2013-10-07 16:12:23 +02:00
parent 9c5d9f8614
commit 6e68d89e0f
2 changed files with 17 additions and 4 deletions
+15 -4
View File
@@ -388,10 +388,21 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
if (focused && iconified)
{
// This is a workaround for window iconification using the
// taskbar leading to windows being told they're focused and
// iconified and then never told they're defocused
focused = FALSE;
if (window->iconified && _glfw.focusedWindow != window)
{
// This is a workaround for window restoration using the
// Win+D hot key leading to windows being told they're
// focused and iconified and then never told they're
// restored
iconified = FALSE;
}
else
{
// This is a workaround for window iconification using the
// taskbar leading to windows being told they're focused and
// iconified and then never told they're defocused
focused = FALSE;
}
}
if (!focused && _glfw.focusedWindow == window)