Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change workspace based on scroll events #123

Merged
merged 2 commits into from
Feb 6, 2025
Merged

Change workspace based on scroll events #123

merged 2 commits into from
Feb 6, 2025

Conversation

ids1024
Copy link
Member

@ids1024 ids1024 commented Jan 24, 2025

Works, I'm not sure how many pixels to interpret as a change to the workspace, and perhaps it should accumulate multiple deltas with a timer. Assuming some lower level of the stack isn't doing that already. I only see ScrollDelta::Pixels events, not Lines, though maybe that's relevant with a different type of input device.

The behavior would also be clearer with animation, though it doesn't seem to bad
(#32).

Fixes #34.

@ids1024
Copy link
Member Author

ids1024 commented Jan 27, 2025

https://github.com/pop-os/cosmic-applets/blob/master/cosmic-applet-workspaces/src/wayland.rs has scroll accumulation with a timer just like I was thinking of, so doing the same thing should work.

Perhaps libcosmic could provide some kind of helper for that...

Works, I'm not sure how many pixels to interpret as a change to the
workspace, and perhaps it should accumulate multiple deltas with a
timer. Assuming some lower level of the stack isn't doing that already.
I only see `ScrollDelta::Pixels` events, not `Lines`, though maybe
that's relevant with a different type of input device.

The behavior would also be clearer with animation, though it doesn't
seem to bad
(#32).

Fixes #34.
Not sure the perfect way to do this; the workspace applet is a little
different.

A helper of some kind should be added to libcosmic.
@ids1024 ids1024 marked this pull request as ready for review February 6, 2025 21:32
@ids1024 ids1024 merged commit 5842829 into master Feb 6, 2025
@ids1024 ids1024 deleted the workspace-scroll branch February 6, 2025 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow scrolling (mouse wheel, touchpad, etc.) between workspaces in the overview
1 participant