-
Notifications
You must be signed in to change notification settings - Fork 11
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
if natural-scroll is enabled, invert scroll inputs #113
Open
cg505
wants to merge
2
commits into
Moon-0xff:main
Choose a base branch
from
cg505:avoid-natural-scroll
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why this was initially added. It seems like my touchpad has a lot of scroll events that are considered emulated but otherwise look normal. This was causing problems for me because I have another extension with scroll event handling on the entire menu bar. A bunch of scroll events would hit this and propagate through, even though I just wanted to interact with the mpris label.
So that's why I removed it. Could also just make it return EVENT_STOP instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember, though gnome-shell's code does the same.
We found the same issue you are describing with Dash-to-panel (#47).
I'm not sure if we want "emulated scroll events" to trigger the scrolling action, this would probably change the volume increasing/decreasing speed in some hardware (can you test if this is the case in yours?). The idea is to follow gnome's volume widget on
behaviour, though we are changing scroll direction here...speed, so I'm more inclined to change EVENT_PROPAGATE to EVENT_STOP.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found this bugzilla thread: https://bugzilla.gnome.org/show_bug.cgi?id=687573, and these commits: https://gitlab.gnome.org/GNOME/gnome-shell/-/commit/7d4e14f38455977ffb103acd85239ed6b1a9d816, https://gitlab.gnome.org/GNOME/gnome-shell/-/commit/c9741ae3d5f661b2aee352c50ce21fab16694fbe (the last one is somewhat confusing to me since I definitely observe events with
is_pointer_emulated()
true).It seems that some events are essentially duplicated, one emulated and one not emulated... I don't have the historical reasoning for why this is the case but my impression is that it has to do with retrofitting touchpad support into X11.
I suppose ideally other extensions should also be checking this, but in practice it doesn't make a lot of sense to propagate the events instead of just ignoring them completely.
Upshot: happy to use EVENT_STOP, makes sense.