Skip to content

Commit 6bbe582

Browse files
committedMar 19, 2024·
(NT-77) If window to focus is already the foreground window, return true
1 parent e2d7a16 commit 6bbe582

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎src/win32/window_manager.cc

+3
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ std::string getWindowTitle(const WindowHandle windowHandle) {
5454

5555
bool focusWindow(const WindowHandle windowHandle) {
5656
auto hWnd = reinterpret_cast<HWND>(windowHandle);
57+
if (GetForegroundWindow() == hWnd) {
58+
return true;
59+
}
5760
if (IsWindow(hWnd)) {
5861
// Restore the window if it's minimized
5962
if (IsIconic(hWnd)) {

0 commit comments

Comments
 (0)
Please sign in to comment.