We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c650f00 commit 0021b37Copy full SHA for 0021b37
src/win32/window_manager.cc
@@ -22,7 +22,8 @@ std::vector<WindowHandle> getWindows() {
22
}
23
24
WindowHandle getActiveWindow() {
25
- if (IsWindow(GetForegroundWindow())) {
+ HWND foregroundWindow = GetForegroundWindow();
26
+ if (IsWindow(foregroundWindow)) {
27
return reinterpret_cast<WindowHandle>(foregroundWindow);
28
29
return -1;
0 commit comments