Fix ToDesk remote scroll passthrough - #936
Open
ZHOUSJ6 wants to merge 11 commits into
Open
Conversation
Cursor routes wheel events through Helper processes, so exception matching and CGEventPostToPid never reached the host app. Co-authored-by: Cursor <cursoragent@cursor.com>
Cursor treats Mos's continuous pixel events as trackpad input and flips them again, so keep the visual direction aligned with other apps. Co-authored-by: Cursor <cursoragent@cursor.com>
Point updates at the ZHOUSJ6/Mos sparkle-feed release and sign archives with a fork-owned EdDSA key instead of the upstream Caldis feed. Co-authored-by: Cursor <cursoragent@cursor.com>
Electron reverse compensation was re-enabling invert after ToDesk passthrough forced reverse off. Co-authored-by: Cursor <cursoragent@cursor.com>
…dency Cursor's renderer helpers may be missing from LaunchServices, making NSRunningApplication(processIdentifier:) return nil. Scroll events were then posted back to the renderer PID where they vanish. Resolve the host main process through proc_pidpath + the parent-PID chain (pure kernel calls, ~4us) and cache the result per target PID so the per-event hot path never performs IPC again. Co-authored-by: Cursor <cursoragent@cursor.com>
Cursor's bundle ID starts with "com.todesktop." (the ToDesktop Electron packaging platform), which contains the "todesk" remote-control keyword. Once host resolution started working again, Cursor was treated as a ToDesk remote session and smooth scrolling was forcibly bypassed. Exclude the com.todesktop. prefix from ToDesk keyword matching while keeping real ToDesk bundles (com.youqu.todesk etc.) detected. Co-authored-by: Cursor <cursoragent@cursor.com>
The "Electron extra inversion" was a misdiagnosis: Cursor scrolling looked reversed only because the todesk keyword misclassification kept forcing reverse off for it. With that fixed, the compensation now cancels the user's reverse setting inside Cursor, flipping it relative to every other app. Remove the compensation so Cursor follows the same reverse settings as everything else; remote sessions still force raw direction via useRawScrollForRemoteControl. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
Verification
DEVELOPER_DIR=\"/Applications/Xcode.app/Contents/Developer\" xcodebuild test -project \"Mos.xcodeproj\" -scheme \"Debug\" -configuration Debug -destination \"platform=macOS\" CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=\"\"