Skip to content

front_mac: DM_CURSOR_HIDDEN=1 starts the game with the pointer hidden - #839

Closed
v0lumehi wants to merge 2 commits into
seedds:mainfrom
v0lumehi:cursor-hidden-start
Closed

v0lumehi wants to merge 2 commits into
seedds:mainfrom
v0lumehi:cursor-hidden-start

Conversation

@v0lumehi

@v0lumehi v0lumehi commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

This builds on #755. Its commit is the first one here, the new commit is the second. Review only the second, and I will rebase once #755 is in.

A launcher that hid the pointer before it started the game has no way to tell the game. The game is a new process and shows the pointer until its own idle wait ends. So the pointer flashes between the two windows.

DM_CURSOR_HIDDEN=1 starts the game with the pointer hidden. The usual DM_CURSOR_HIDE rule takes over once the pointer has been over the game window once. Before that the not-over rule is held back, because a new window is not key yet when the timer first runs.

Checked: python3 dm/tools/tests/test_env_switches.py passes. I could not test the transition on screen.

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.
A launcher that hid the pointer before it started the game can pass this, so the pointer does not show up between the two windows. The usual DM_CURSOR_HIDE rule takes over once the pointer has been over the game window.
v0lumehi added a commit to LNPANDY/NX2Apple that referenced this pull request Nov 1, 2026
v0lumehi added a commit to LNPANDY/NX2Apple that referenced this pull request Nov 1, 2026
v0lumehi added a commit to LNPANDY/NX2Apple that referenced this pull request Nov 1, 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. Closing together with #755: #584 (landed in c1df4dd) hides the pointer on game input instead of after an idle wait, so there is no timer to start hidden. A launcher player's first button press or stick move in the game hides it, so no DM_CURSOR_HIDDEN switch is needed.

@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