mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-11-27 23:19:13 +08:00
[Settings]bring up maximized window fix (#14510)
This commit is contained in:
parent
36bbce78d7
commit
105f94690d
@ -457,7 +457,17 @@ void bring_settings_to_front()
|
||||
}
|
||||
if (wcsncmp(title, windowTitle.c_str(), len) == 0)
|
||||
{
|
||||
ShowWindow(hwnd, SW_RESTORE);
|
||||
auto lStyles = GetWindowLong(hwnd, GWL_STYLE);
|
||||
|
||||
if (lStyles & WS_MAXIMIZE)
|
||||
{
|
||||
ShowWindow(hwnd, SW_MAXIMIZE);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowWindow(hwnd, SW_RESTORE);
|
||||
}
|
||||
|
||||
SetForegroundWindow(hwnd);
|
||||
return FALSE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user