Repository navigation
feat(config): configure cursor capture per application - #6200
Open
medialaxis wants to merge 1 commit into
Open
medialaxis wants to merge 1 commit into
medialaxis wants to merge 1 commit into
Conversation
Author
|
medialaxis
force-pushed
the
feat/app-cursor-capture
branch
from
November 28, 2026 17:15
ad1c66f to
4abaa24
Compare
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Add a global default and per-application override for the initial mouse-cursor capture state when starting a stream:
capture_cursorinsunshine.conf): Defaults toenabled(preserving current behavior), initializesdisplay_cursor, is exposed as Capture mouse cursor by default in Configuration → Advanced, and is documented indocs/configuration.md.capture-cursorinapps.json): Optional boolean field exposed in Applications as Capture mouse cursor (Use global default / On / Off).POST /api/appsstrips"capture-cursor": nullvianormalize_optional_app_fields(), andApps.vueomitsnullfrom the save payload without mutatingeditForm.display_cursor = _app.capture_cursor.value_or(config::video.capture_cursor). Terminating an active application restoresdisplay_cursortoconfig::video.capture_cursor(while an idleterminate()leavesdisplay_cursorunchanged).Ctrl+Alt+Shift+Nstill toggles cursor capture during a session (retained across resuming the same app), and mouse/keyboard input remain available when cursor capture is disabled.This enables setups such as keeping the host cursor visible for Desktop while starting controller-driven apps (e.g. Steam Big Picture) or fullscreen games (e.g. for NvFBC direct capture) with cursor capture disabled by default.
Screenshot
Issues Fixed or Closed
Roadmap Issues
Testing
tests/unit/test_config.cpp(AppliesCaptureCursorDefaultAndOverrides): verifies default andenabled/disabledparsing updates bothconfig::video.capture_cursoranddisplay_cursor.tests/unit/test_process.cpp(ParsesAndAppliesAppCursorCapture): verifies optionalcapture-cursorparsing fromapps.json, idleterminate()not clobberingdisplay_cursor,execute()applying unset/false/trueoverrides, and post-runterminate()restoringconfig::video.capture_cursor.tests/unit/test_confighttp.cpp(SaveAppOmitsNullOptionalFieldsAndPreservesConfiguredValues): verifiesPOST /api/appsomits"capture-cursor": nulland preserves"capture-cursor": false.tests/web/Apps.optional-fields.test.js: verifiesApps.vuedefaults'capture-cursor'tonull, omits it from the POST payload without mutatingeditForm, and preservesfalse.tests/web/Configuration.test.js: verifies#capture_cursorinAdvanced.vuedefaults to'enabled'fromconfig_tabs.jsonand toggles between'disabled'and'enabled'.uv run --locked --no-sync lb-update-clang-format— clean (no formatting diffs).npm test— 13/13 test files, 220/220 tests passed.cmake-build-test/tests/test_sunshine(ConfigConsistencyTest.*,LocaleConsistencyTest.*,ConfigPersistenceTest.*,ConfigDefaultsTest.*,ConfigParsingTest.*,ConfigHttpTest.*,ProcessTest.*,ProcessRefreshTest.*) — all passed (100/100 before final doc/test trims;ConfigConsistencyTest.*8/8 andConfigPersistenceTest.*:ProcessTest.*24/24 re-run and passed after final edits).capture_cursor = falsestarts a stream with cursor capture disabled.Type of Change
Checklist
AI Usage
See our AI usage policy.