fix(agent): apply per-app gesture button clicks#430
Open
devsaddle wants to merge 1 commit into
Open
Conversation
devsaddle
marked this pull request as ready for review
July 20, 2026 09:55
Comment on lines
+77
to
+79
| let Some(key) = config_key else { | ||
| return BTreeMap::new(); | ||
| }; |
There was a problem hiding this comment.
Unreachable early-return guard
The let Some(key) = config_key else { return BTreeMap::new() } branch can never execute: the owner check immediately above already calls config_key.and_then(|key| config.gesture_owner(key)), so when config_key is None the owner is None, None != Some(ButtonId::GestureButton) fires, and the function returns an empty map before reaching this guard. The let Some(key) arm is dead code that could confuse future readers into thinking there is a reachable None-key path distinct from the owner-check path.
devsaddle
force-pushed
the
codex/fix-per-app-gesture-button
branch
from
July 20, 2026 10:00
1058b38 to
c16ed37
Compare
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
Apply per-application plain-click overrides to the dedicated HID++ gesture button while preserving its global directional gestures.
This completes the dedicated gesture-button counterpart to the OS-hook per-app behavior introduced in #188.
Root cause
The foreground-app update path rebuilt the OS-hook binding maps, but the dedicated HID++ gesture map was only rebuilt from global device bindings. As a result, a per-app
GestureButtonentry was parsed and persisted correctly but the capture watcher continued dispatching the globalClickaction.Changes
Clickaction from the active app overlayUp,Down,Left, andRighton the global gesture mapTesting
cargo fmt --all -- --checkcargo test -p openlogi-agent-core --locked(42 unit tests, 8 wire-format tests)cargo clippy -p openlogi-agent-core --all-targets --locked -- -D warningsMouseBackclick and navigated backBrowserBackclick and navigated back