Fixed focus for Win+D window restoration.
This commit is contained in:
parent
9c5d9f8614
commit
6e68d89e0f
@ -208,6 +208,8 @@ See the [GLFW documentation](http://www.glfw.org/docs/latest/).
|
|||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
- [Win32] Bugfix: Restoring windows using the Win+D hot key did not trigger the
|
||||||
|
focus callback
|
||||||
- [Win32] Bugfix: The disabled cursor mode clip rectangle was updated for
|
- [Win32] Bugfix: The disabled cursor mode clip rectangle was updated for
|
||||||
unfocused windows
|
unfocused windows
|
||||||
- [Cocoa] Bugfix: The `GLFW_KEY_GRAVE_ACCENT` and `GLFW_KEY_WORLD_1` keys had
|
- [Cocoa] Bugfix: The `GLFW_KEY_GRAVE_ACCENT` and `GLFW_KEY_WORLD_1` keys had
|
||||||
|
@ -387,12 +387,23 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
|
|||||||
BOOL iconified = HIWORD(wParam) ? TRUE : FALSE;
|
BOOL iconified = HIWORD(wParam) ? TRUE : FALSE;
|
||||||
|
|
||||||
if (focused && iconified)
|
if (focused && iconified)
|
||||||
|
{
|
||||||
|
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
|
// This is a workaround for window iconification using the
|
||||||
// taskbar leading to windows being told they're focused and
|
// taskbar leading to windows being told they're focused and
|
||||||
// iconified and then never told they're defocused
|
// iconified and then never told they're defocused
|
||||||
focused = FALSE;
|
focused = FALSE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!focused && _glfw.focusedWindow == window)
|
if (!focused && _glfw.focusedWindow == window)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user