Repository navigation
Conversation
2881c46 to
2e01ea5
Compare
[Medium impact] No established issue blocks merging this PR. SummaryThis PR uses scroll phase to tell wheel notches from touchpad gestures.
No actionable issues were established. Tests were not run during this review. Reviews (2) · Last reviewed commit: "Tell wheel from touchpad by scroll phase..." · Reviewed by Greptile |
|
I second this.. The default scrolling is incredibly slow. |
|
Hi @timolehto, thank you for tracking this down and for such a clear write-up! The table of what Qt 6.12 actually sends made the cause easy to follow. I'm running into the same thing on Omawrite 0.7.2 (the Omarchy package) with Qt 6.12.0 on Hyprland and a Logitech MX Master 4: one wheel notch moves about a line, so your fix would make a real difference. Since the 0.7.x releases landed, the branch has fallen behind master and now has conflicts. Would you be up for rebasing it when you get a chance? And if you're busy, no worries at all: I'd be glad to open a rebased version that keeps you as the commit author and credits this PR. |
Qt 6.12 started passing Wayland's pixel value through for wheel notches (qtbase d19bd66b4, "wayland: Always populate pixelDelta for axis scroll events"), so a notch now arrives with pixelDelta 15 beside angleDelta 120. Testing pixelDelta therefore sent every notch down the one-to-one touchpad path: 15px instead of the 120px wheel step, eight times too slow. Ctrl+wheel zoom needed several notches per step for the same reason. Qt wraps finger scrolling in ScrollBegin/Update/End and gives wheel notches no phase, on every Qt version, so test the phase instead. Touchpad pixels taken one to one also crawl next to other apps under the same compositor. Scale them by 6: Qt reports 12 angle units per touchpad pixel, so that is 60px per 120 angle units, the rate omacom#42 uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2e01ea5 to
562f55e
Compare
|
@nojaf thanks for the nudge. Rebased onto current master (0.7.5). The code is unchanged: the only snag was that the CMake move renamed The Omarchy stable channel still ships 0.7.2. If you want to patch that version, the pre-rebase commit is on |
Fixes #130.
Problem
Since Qt 6.12, mouse wheel scrolling in the editor is about 8 times too slow on Wayland, and Ctrl+wheel zoom needs several notches per step.
Qt 6.12 started passing Wayland's pixel value through for wheel notches (qtbase d19bd66b4, "wayland: Always populate pixelDelta for axis scroll events"). Before that, Qt dropped it for wheel sources. The
WheelHandlertells a wheel from a touchpad by whetherpixelDeltais set, so every notch now takes the one-to-one touchpad path and moves 15px instead of the 120px wheel step.What a Qt 6.12 app receives on Hyprland:
phasepixelDelta.yangleDelta.yNoScrollPhaseScrollUpdateTouchpad scrolling is slow on its own as well: pixels taken one to one crawl next to other apps under the same compositor (see the comments on #42).
How
ScrollBegin/ScrollUpdate/ScrollEndand gives wheel notchesNoScrollPhase, on every Qt version. Both scrolling and Ctrl+wheel zoom use the sameisTouchpad()test.touchpadGain). Qt reports 12 angle units per touchpad pixel, so this is 60px per 120 angle units, the rate Improve touchpad scrolling with kinetic momentum #42 uses.Verification
bin/test: 110 passed, 0 failed.scrollsWheelNotchesAndTouchpadByPhasesends a notch withpixelDelta−15 and checks it scrolls a fullwheelStep, then checks a touchpad event movespixelDelta × touchpadGain. On master it fails: the notch moves 15px.banksTouchpadScrollBeforeChangingTextSizenow passes the phase, and its wheel notch carries the 15px value too.build/omawriteand tried a USB wheel mouse and a touchpad on a long document (Omarchy / Hyprland, Qt 6.12.0).This only fixes the scroll distance. It adds no momentum after the fingers lift; that is #42 and #53.
Related: #42, #53, #71.
🤖 Generated with Claude Code