fix: Restore Fast User Switching handling on macOS 15+ - #172
Merged
artginzburg merged 1 commit intoAug 1, 2026
Merged
Conversation
|
Tested on MacOS 26.4.1 successfully, thanks! |
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.
Closes #127.
Hi! This brings back the Fast User Switching fix from #127 for macOS 15 and newer, where it's currently disabled.
Problem
When two users are logged in and both run MiddleClick, the middle-click gesture stops working for whichever user isn't the first one logged in. You have to log the other user out for it to start working again. I run into this every day on macOS 26.5.2 with two accounts and Fast User Switching.
#127 was already fixed once (in 5f4af9e), but that fix is gated behind a macOS version check that turns it off on 15+, on the assumption that Apple fixed the underlying issue in Sequoia. That doesn't seem to be the case, it still reproduces on 26.5.2.
Root cause
Both users' MiddleClick instances register and start callbacks on the same
AppleMultitouchDevice. With two sessions holding the device at once, the private MultitouchSupport framework stops delivering frame callbacks reliably. Stopping the listeners in whichever session isn't on-console removes the contention, which is exactly what the existing session handling already does, it just wasn't running on 15+.Changes
restartListeners()(stop-then-start) instead of a bare start, so repeated or bursty session notifications are idempotent.Testing
Tested on a trackpad, macOS 26.5.2, with two user accounts:
I couldn't test on macOS < 15 (no machine on it). That path already had session handling enabled before this PR, so it's unchanged there apart from the debounce simplification above. Happy to attach a test build or tweak anything if a reviewer on an older version wants to verify.