Skip to content

Commit

Permalink
(NT-77) If window to focus is already the foreground window, return true
Browse files Browse the repository at this point in the history
  • Loading branch information
s1hofmann committed Mar 19, 2024
1 parent e2d7a16 commit 6bbe582
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/win32/window_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ std::string getWindowTitle(const WindowHandle windowHandle) {

bool focusWindow(const WindowHandle windowHandle) {
auto hWnd = reinterpret_cast<HWND>(windowHandle);
if (GetForegroundWindow() == hWnd) {
return true;
}
if (IsWindow(hWnd)) {
// Restore the window if it's minimized
if (IsIconic(hWnd)) {
Expand Down

0 comments on commit 6bbe582

Please sign in to comment.