Repository navigation
bugfix: forward scroll to a pinned window drawn over a stand-in window - #333
Open
Granitosaurus wants to merge 1 commit into
Open
Granitosaurus wants to merge 1 commit into
Granitosaurus wants to merge 1 commit into
Conversation
An unbound scroll over a suspended stand-in is swallowed because there is no client to forward it to. The check is a canvas-space hit test, so a screen-pinned window drawn over the stand-in was invisible to it: the scroll was dropped instead of reaching the pinned window. Skip the swallow when the pointer is over a screen-space target. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Granitosaurus
marked this pull request as ready for review
November 7, 2026 07:28
8 tasks done
This branch has not been deployed
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.
Hello!
First, really dig the project. I spent couple evenings setting everything up and onboarding myself for contributing.
I'm working on a bigger scratchpad/pin feature in #334 where I identified this bug so as per contribution instructions I'm keeping PRs tiny and focused by cherry-picking this bug fix.
Below is mix of my writing and claude generated report. I've tested this on my machine and the fix does work and I hadn't noticed any regressions
Problem
Scrolling over a screen-pinned window does nothing when a suspended stand-in
(the placeholder left after a restart or a suspend) sits on the canvas
underneath it.
Repro:
pinned_to_screenwindow, atoggle-scratchpadwindow, or the pavucontrol popup).I made a little video to illustrate this:
2026-11-07_14-10-41.mp4
Here if placeholders are in focus the scroll wheel is being stolen and scrolling doesn't work while scrollbar works on scratchpad window. Where if I select active window in 2nd part of the window the scroll works as expected.
Cause
At the end of
on_pointer_axis, an unbound scroll is swallowed whendecoration_under(pos)finds a stand-in, since a stand-in has no client to forward to. That hit test is canvas-space, so it finds the stand-in beneath the pinned window and drops the scroll before it reaches the pin. Pinned windows are drawn and hit-tested in screen space, so the canvas test cannot see them.Fix
Skip the swallow when the pointer is over a screen-space target (
!self.pointer_over_screen_space), the flagfocus_cascadealready sets when a pinned window or layer is hit. One condition, plus a comment explaining why.Scroll bindings (e.g.
mod+wheel) are unaffected, as they run before the swallow.Tests
src/tests/pinned_scroll.rs: a pinned window over a stand-in, a trackpad scroll, and a check that the client received an axis event. It fails without the fix and passes with it.cargo fmt --check,cargo clippy --all-targets -- -D warningsandcargo test -- --include-ignored --skip soakpass locally.