Skip to content

Commit

Permalink
[Settings]bring up maximized window fix (#14510)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidegiacometti committed Nov 18, 2021
1 parent 36bbce7 commit 105f946
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/runner/settings_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 105f946

Please sign in to comment.