mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[Settings]bring up maximized window fix (#14510)
This commit is contained in:
committed by
GitHub
parent
36bbce78d7
commit
105f94690d
@@ -456,8 +456,18 @@ void bring_settings_to_front()
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (wcsncmp(title, windowTitle.c_str(), len) == 0)
|
if (wcsncmp(title, windowTitle.c_str(), len) == 0)
|
||||||
|
{
|
||||||
|
auto lStyles = GetWindowLong(hwnd, GWL_STYLE);
|
||||||
|
|
||||||
|
if (lStyles & WS_MAXIMIZE)
|
||||||
|
{
|
||||||
|
ShowWindow(hwnd, SW_MAXIMIZE);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
ShowWindow(hwnd, SW_RESTORE);
|
ShowWindow(hwnd, SW_RESTORE);
|
||||||
|
}
|
||||||
|
|
||||||
SetForegroundWindow(hwnd);
|
SetForegroundWindow(hwnd);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user