[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 a new issue