Skip to content

feat: step volume/brightness gestures while dragging - #168

Open
asdolo wants to merge 1 commit into
mmaher88:masterfrom
asdolo:continuous-gesture-volume
Open

asdolo wants to merge 1 commit into
mmaher88:masterfrom
asdolo:continuous-gesture-volume

Conversation

@asdolo

@asdolo asdolo commented Oct 25, 2026

Copy link
Copy Markdown

Summary

  • Fire continuous Volume/Brightness gesture actions while dragging (Options+-style), thresholded like thumb-wheel volume
  • Keep one-shot gesture bindings on release; skip release fire if continuous steps already ran
  • Add unit coverage for continuous volume/brightness, reverse drag, and one-shot behavior

Fixes #155.

Test plan

  • ButtonActionDispatcherFixture continuous + one-shot tests
  • Full pre-push suite (C++, tray, QML, pytest)
  • Manual: map gesture Up/Down to VolumeUp/Down, hold + drag — volume ticks while moving, not only on release
  • Manual: one-shot binding (e.g. desktop switch) still fires once on release

Match Logi Options+ by firing continuous Volume/Brightness actions
during gesture motion (thresholded), keeping one-shot bindings on
release. Fixes mmaher88#155.

@mmaher88 mmaher88 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is a clean, focused fix for #155, and the tests read well. One blocker: onGestureRaw resolves PresetRef bindings on every raw XY report. On GNOME, resolveNamedAction starts a synchronous gsettings get process, so any drag on a preset-bound direction (the Navigation bundle) would start many processes per second on the GUI thread. No shipped preset maps to volume or brightness, so please treat PresetRef as non-continuous without resolving it, or decide continuity once when the axis locks and keep it in the per-device state.

Please also rebase onto master. Since #174 the slots take a PhysicalDevice*, so use device->deviceSerial() and pass m_physical in the tests. Finally, could you try the step size on hardware at a couple of DPI settings? 50 raw counts may be very sensitive at high DPI.

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.

Volume controls with gestures is weird

2 participants