Skip to content

front_mac: DM_CURSOR_HIDE hides the pointer after a few idle seconds over the game - #755

Closed
v0lumehi wants to merge 1 commit into
seedds:mainfrom
v0lumehi:v0lumehi/mac-hide-idle-pointer
Closed

v0lumehi wants to merge 1 commit into
seedds:mainfrom
v0lumehi:v0lumehi/mac-hide-idle-pointer

Conversation

@v0lumehi

Copy link
Copy Markdown
Contributor

What and why

A Mac game's pointer stays on the picture. macOS hides it only for an app that asks, and a game window does not. In the NX2Apple launcher's Console Mode a player uses a controller, so the pointer sits over the game until the mouse is moved to a screen corner. This happens in a window and in fullscreen.

Change, in dm/host/front_mac.m front_run only: the pointer hides after DM_CURSOR_HIDE seconds without movement over the game view, and shows again on the next movement, click or scroll. A local event monitor records the last mouse activity and a 0.25 s timer decides. The pointer is shown whenever the window is not key, the app is not active or the pointer is outside the game view, so the title bar and other windows keep theirs.

The switch is DM_CURSOR_HIDE=<seconds>. The default is 3. 0 keeps the pointer visible as before. It is a player switch in docs/env_switches.tsv. The reference entry is The pointer stays on a Mac game, and the symptom index is updated.

The code does not depend on the fullscreen work in #665 or the screen choice in #670. It sits after the DM_FULLSCREEN request in front_run and applies to a window and to fullscreen alike.

Found with the NX2Apple launcher (LNPANDY/NX2Apple#272). NX2Apple carries the same change as a patch until this merges.

Checked

  • Tests: make -C dm/host GAME=010015100B514000 dmhost builds, make -C dm/host/tests GAME=010015100B514000 run passes, and dm/tools/tests/test_docs.py, test_env_switches.py and test_launcher_settings.py pass. test_docs.py caught the missing symptom index line, which python3 dm/tools/docs_symptoms.py then added. dm/tools/lint_python.py was not run, no Python changed.
  • Games run: none. The new code was built, not run in a window, so the hiding and showing with a controller is not confirmed here.
  • Devices and OS: Apple silicon Mac, macOS 27.
  • scripts/regress.py: not run. The change is in the window setup, which a headless run never takes (no DM_WINDOW).

Docs

  • The finding is in its docs/reference/frame-rate.md entry, and python3 dm/tools/docs_symptoms.py was run (the symptom index)
  • No game files, keys or data extracted from a game in the change or the attachments

The Mac host never hid the pointer, so it stayed on the picture of a game in a window and in fullscreen. It now hides after DM_CURSOR_HIDE seconds (3 by default, 0 keeps it) without movement over the game view and shows again on the next movement, click or scroll. It is shown whenever the window is not key or the pointer is outside the game view.

Documented in docs/env_switches.tsv and docs/reference/frame-rate.md, with the symptom index updated.
v0lumehi added a commit to LNPANDY/NX2Apple that referenced this pull request Oct 30, 2026
nobz226 pushed a commit to nobz226/NX2Apple that referenced this pull request Oct 31, 2026
seedds added a commit that referenced this pull request Nov 1, 2026
…ves (#584, fixes #675)

A key the game takes, a controller button or a stick past 15% (GameController
and raw HID pads) asks AppKit to hide the pointer, setHiddenUntilMouseMoves,
while the game window is key, the app is active and the pointer is over the
content view. Moving the mouse shows it again; losing focus shows it too.
No timer and no setting: this supersedes #755 and #839.

Co-authored-by: Daniel Ullrich <[email protected]>
@seedds

seedds commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Thanks for this. Closing as superseded by #584, landed in c1df4dd: game input (keys, controller buttons, sticks past 15%, raw HID pads too) asks AppKit to hide the pointer over the picture with setHiddenUntilMouseMoves:, and moving the mouse or losing focus shows it again. That covers the controller case without an idle timer or a DM_CURSOR_HIDE switch.

@seedds seedds closed this Nov 1, 2026
Know-It-All-Brother pushed a commit to Know-It-All-Brother/nxnative that referenced this pull request Nov 9, 2026
…ves (seedds#584, fixes seedds#675)

A key the game takes, a controller button or a stick past 15% (GameController
and raw HID pads) asks AppKit to hide the pointer, setHiddenUntilMouseMoves,
while the game window is key, the app is active and the pointer is over the
content view. Moving the mouse shows it again; losing focus shows it too.
No timer and no setting: this supersedes seedds#755 and seedds#839.

Co-authored-by: Daniel Ullrich <[email protected]>
lucaszhongsj pushed a commit to lucaszhongsj/nxnative that referenced this pull request Nov 19, 2026
Upstream-Status: fork-only (declined seedds#755, seedds#839)
Reason: Hide the mouse cursor over a running Mac game after idle timeout and when launched with the cursor hidden
Issue: LNPANDY/NX2Apple#280
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants