Skip to content

feat(windows): report editable focus to negotiated streaming clients - #6165

Open
Zeen-x wants to merge 1 commit into
SunshineStream:masterfrom
Zeen-x:feat/windows-editable-focus
Open

Zeen-x wants to merge 1 commit into
SunshineStream:masterfrom
Zeen-x:feat/windows-editable-focus

Conversation

@Zeen-x

@Zeen-x Zeen-x commented Nov 22, 2026

Copy link
Copy Markdown

Description

When a streaming client taps a Windows text field, it needs to know whether the click reached an editor and where that editor appears in the captured frame. This change lets the client opt into a 76-byte v1 remote text context message over its encrypted control connection. The client decides whether to show its keyboard.

The Windows UI Automation worker runs while at least one client subscribes. It checks for a focused, enabled, explicitly writable Edit control and reports focus metadata and geometry. Field contents stay on the host. The router matches completed taps or clicks, translates signed desktop coordinates to capture-local pixels, and sends updates to the owning connection. The Input settings page includes a host switch.

The wire format follows Foundation Sunshine #1029. Companion client-library PR: moonlight-stream/moonlight-common-c#176

Screenshot

Issues Fixed or Closed

Roadmap Issues

Testing

  • Built sunshine.exe and test_sunshine.exe on Windows x64 with MSYS2 UCRT64, Release, system tray disabled.
  • Ran test_sunshine.exe with SUNSHINE_TEST_INTERACTIVE_FOCUS=1 and SKIP_SYSTEM_TESTS=1: 919 passed, 15 skipped, 0 failed. All seven new focus tests passed, including a real Win32 Edit gaining focus and deactivating when focus moved to a read-only Edit. Routing tests cover negative-origin coordinates, cancelled gestures, multitouch, ambiguous hits and session lifecycle. Skips included tray, URL launcher, device, encoder and platform-specific tests.
  • Ran npm run build and the complete Vitest suite: 221 passed. A separate local smoke test decoded both host-generated state transitions with the companion common-c decoder.

Still to verify: installed Windows service mode, physical mixed-DPI monitors with a negative desktop origin, Android Moonlight V+ streaming, and frame-time impact during gameplay. The coordinate tests used synthetic inputs. The decoder smoke test passed payloads directly. Linux and macOS builds were not run.

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Tests have been added or updated for new or modified functionality, including regression tests for bug fixes

AI Usage

See our AI usage policy.

  • AI tools were used while preparing this PR

Prepared with OpenAI Codex (GPT-6.2 Astra, high reasoning effort).

Use an on-demand UI Automation worker and match completed remote gestures in physical screen coordinates. Publish Foundation-compatible v1 metadata to the owning encrypted control connection.
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
48 New issues

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

This branch has not been deployed

No deployments
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