YaLTeR / niri

A scrollable-tiling Wayland compositor.
https://matrix.to/#/#niri:matrix.org
GNU General Public License v3.0
2.83k stars 81 forks source link

Unexpected horizontal scrollback behavior #512

Closed usualwitch closed 2 days ago

usualwitch commented 4 days ago

Description

When using focus-follows-mouse with horizontal focus-column bindings, moving the mouse near the screen edges can trigger unintended scrolling, even when there are no partial columns visible.

Configuration

input {
    focus-follows-mouse
}

binds {
    Mod+L { focus-column-right; }
    Mod+H { focus-column-left; }
    Mod+WheelScrollDown { focus-column-right; }
    Mod+WheelScrollUp { focus-column-left; }
}

Steps to Reproduce

  1. Ensure the screen shows only full columns (no partial columns visible).
  2. Use a keybinding or Mod+mouse wheel to scroll the screen right.
  3. Wait for any duration (even up to a minute).
  4. Move the mouse near the left edge of the screen.

Expected Behavior: Moving the mouse should not cause any horizontal scrolling, as there are no peek windows outside the screen.

Actual Behavior: Moving the mouse near the left edge of the screen causes the screen to scroll back.

The same thing happens if I scroll the screen left then move the mouse near the right edge of the screen.

Additional Notes

This scrollback only occurs once. Seems like it only undos the most recent scrolling action. Is it possible to disable this auto-scrollback behavior?

System Information

YaLTeR commented 4 days ago

Hi, we're discussing this here: https://github.com/YaLTeR/niri/discussions/491

YaLTeR commented 2 days ago

Yesterday I pushed a setting that should fix this:

    focus-follows-mouse max-scroll-amount="0%"