emilk / emilk/egui

Control+Scroll prevents scrolling in the future on niri

Open
#8,325 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
30.6k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
72

Description

**Describe the bug**

On `niri` (https://github.com/niri-wm/niri/), scrolling works fine, but if the control key is pressed while scrolling, the control key is "sticky" and normal scroll behaviour does not return.

I have bisected this down to commit `1b77d7047`, and adding some logging into `src/input_state/wheel_state.rs` shows that the function is passed a `TouchPhase::Start` even when scrolling with a mouse, but it does not receive a subsequent `TouchPhase::End`

The behaviour of the mouse scroll wheel can be restored by scrolling with a touchpad, but only until ctrl+scroll-ing again with the mouse.

**To Reproduce**

Run the egui demo in `niri`:

```
cargo run --release -p egui_demo_app --features "wayland"
```

Open the `text layout` example and make the window too small to fit all the text vertically.

Scroll vertically and notice the text scrolling

Hold control and scroll, nothing happens

Release control again, and try scrolling. The text does not scroll. This is consistent across egui

**Desktop (please complete the following information):**
- OS: Up to date arch-linux
- Window manager: `niri` I tried to reproduce this in KDE, but it does not reproduce. It also does not reproduce inside niri running inside a window in KDE
- Mouse: Logitech G502X (Not sure if it is relevant, but smooth scrolling seems to be related here)

Contributor guide

Open the contributing guide

Research direction

Start by running the egui demo with `cargo run --release -p egui_demo_app --features "wayland"`, then inspect `src/input_state/wheel_state.rs` while reproducing the Ctrl+mouse-wheel sequence in the text layout example. Trace the `TouchPhase::Start` event and missing `TouchPhase::End`; done means normal mouse-wheel scrolling works again after releasing Ctrl.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, rust
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.