Skip to content

fix(browser): let the scrollbar keep its drag instead of starting a marquee - #1959

Merged
l0gicgate merged 3 commits into
lgse:mainfrom
wmfeht:fix/1938-scrollbar-drag-starts-marquee
Oct 31, 2026
Merged

l0gicgate merged 3 commits into
lgse:mainfrom
wmfeht:fix/1938-scrollbar-drag-starts-marquee

Conversation

@wmfeht

@wmfeht wmfeht commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Dragging the scrollbar handle in a file view started a rubber-band (marquee) selection instead of scrolling.

The marquee's drag gesture sits on the scrolled window in the capture phase, so it sees every press before the scrollbars inside it. It only stepped aside for presses on an item's rendered content. With overlay scrollbars (the GNOME default), the scrollbar is drawn over the blank right-hand part of the rows, so a press on it looked like a press on blank row space: the marquee began and claimed the sequence once the drag crossed the threshold, taking it away from the scrollbar.

The marquee now ignores any press that lands on a gtk::Scrollbar inside its surface, before any item or Alt-force checks, so the scrollbar keeps its own drag. This covers every view that installs the marquee, including Columns.

Reproduced on Ubuntu 24.04 / GNOME Shell 46 Wayland / GTK 4.14.5 (matching the reporter's Zorin OS 18.1), and confirmed fixed there with a build of this branch.

Visual evidence

Before/After:

screenrecording-2026-10-30_22-48-48.mp4
screenrecording-2026-10-30_23-02-09.mp4

How to test

  1. On GNOME (or any desktop with overlay scrollbars), open a folder with enough files to scroll in List, Icons or Columns view.
  2. Hover the right edge so the scrollbar appears, then press on the scrollbar handle and drag it up and down.
  3. Press on blank space in the view and drag.

Expected result: Dragging the handle scrolls the view and no selection rectangle appears or files get selected. Dragging from blank space still draws a selection rectangle as before.

Related issue

Closes #1938

@github-actions github-actions Bot added the fix label Oct 31, 2026
@l0gicgate

Copy link
Copy Markdown
Contributor

Reviewed and brought up to date with main (merged 70510243d, no conflicts).

The fix is sound: the capture-phase marquee gesture now defers to any gtk::Scrollbar found between the pick result and its surface, and since the Columns surface (LoadPresentation.stack) wraps the scrolled window, the check covers List, Icons, Columns and inline search alike. The new regression test is behavioral (a press on the scrollbar leaves the marquee inactive, a press on blank viewport still starts one), so it stays.

Only change beyond the merge: one sentence in docs/architecture.md, which records marquee ownership policy, noting that a viewport's own scrollbars never start a marquee.

Local verification: ui::marquee:: and ui::pointer:: (12 tests, all passing, including the new scrollbar case), cargo fmt --all --check, and cargo clippy --all-targets --all-features -- -D warnings. CI is green on the new head.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

scroll bar handler is not draggable

2 participants