Repository navigation
Conversation
…switch A receiver whose slot pings all fail is kept open until a mouse links up on it. DeviceManager held a single such receiver, so when two came back with no mouse linked yet (both receivers returning together after a KVM switch), the second one replaced the first and the first mouse was never set up again. Idle receivers are now tracked per devNode. Data on one re-probes only that receiver; a receiver that goes away (unreadable or udev remove) stops being watched. Tests: test_idle_receivers.cpp drives the watch with pipes standing in for two receivers. DeviceRegistry.ReloadByPathRefreshesSingleDevice no longer depends on running before any test that calls ensureApp(): it turns QStandardPaths test mode off for its duration and restores it.
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
Mice on Bolt receivers sometimes weren't set up again after switching a KVM back.
A receiver whose slot pings all fail (no mouse linked yet) is kept open until a mouse links up on it, and is then probed again.
DeviceManagercould hold only one such receiver (m_receiverDevice/m_receiverNotifier). With two receivers, both can come back from a KVM switch before either mouse has linked. When that happens, the second receiver replaces the first, so the first receiver's mouse is never set up again.Seen on hardware: two Bolt receivers came back at the same moment, both had no mouse linked yet, and the running app had only one of them open. The MX Master 3S For Business stayed unconfigured until the app was restarted.
Change
m_idleReceivers), each with its own socket notifier, so several can wait at once.Tests
test_idle_receivers.cpp: pipes stand in for two receivers. With the old one-receiver behaviour put back, 4 of its 5 tests fail.DeviceRegistry.ReloadByPathRefreshesSingleDevice: this test only passed if it ran before any test that callsensureApp().ensureApp()switches Qt into a test mode that ignoresXDG_DATA_HOME, which this test relies on. The test now turns that mode off for its own duration and restores it afterwards. The comment intest_action_filter_model.cppthat described working around this is updated.🤖 Generated with Claude Code