Skip to content

Commit 3c439ee

Browse files
committed
Cursor should not go busy & window should not be active
1 parent dd33a45 commit 3c439ee

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/modules/MouseUtils/FindMyMouse/FindMyMouse.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,10 @@ LRESULT SuperSonar<D>::BaseWndProc(UINT message, WPARAM wParam, LPARAM lParam) n
269269

270270
case WM_NCHITTEST:
271271
return HTTRANSPARENT;
272+
273+
case WM_SETCURSOR:
274+
SetCursor(LoadCursor(nullptr, IDC_ARROW));
275+
return TRUE;
272276
}
273277

274278
if (message == WM_PRIV_SHORTCUT)
@@ -535,7 +539,7 @@ void SuperSonar<D>::StartSonar()
535539
Trace::MousePointerFocused();
536540
// Cover the entire virtual screen.
537541
// HACK: Draw with 1 pixel off. Otherwise, Windows glitches the task bar transparency when a transparent window fill the whole screen.
538-
SetWindowPos(m_hwnd, HWND_TOPMOST, GetSystemMetrics(SM_XVIRTUALSCREEN) + 1, GetSystemMetrics(SM_YVIRTUALSCREEN) + 1, GetSystemMetrics(SM_CXVIRTUALSCREEN) - 2, GetSystemMetrics(SM_CYVIRTUALSCREEN) - 2, 0);
542+
SetWindowPos(m_hwnd, HWND_TOPMOST, GetSystemMetrics(SM_XVIRTUALSCREEN) + 1, GetSystemMetrics(SM_YVIRTUALSCREEN) + 1, GetSystemMetrics(SM_CXVIRTUALSCREEN) - 2, GetSystemMetrics(SM_CYVIRTUALSCREEN) - 2, SWP_NOACTIVATE);
539543
m_sonarPos = ptNowhere;
540544
OnMouseTimer();
541545
UpdateMouseSnooping();

0 commit comments

Comments
 (0)