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

Fix scroll issue in media view on some logitech hi-res wheel mouse #27245

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

detiam
Copy link

@detiam detiam commented Dec 21, 2023

on some hi-res wheel supported mouse, the scroll experience is not good. at least on my logitech g903 ls, when I ↑↓↑↓ my wheel for compare two picture, the first scroll that after scroll direction changed will always lost.

closes #27252


related links:

@CLAassistant
Copy link

CLAassistant commented Dec 21, 2023

CLA assistant check
All committers have signed the CLA.

@ilya-fedin
Copy link
Contributor

Do you plan to add this hack to each & every app on your desktop? This honestly sounds counter-productive to me and I would rather suggest to add this to libinput or display server.

@detiam
Copy link
Author

detiam commented Dec 21, 2023

Do you plan to add this hack to each & every app on your desktop?

humm no? telegram is the only app I know that synthesizes discrete scroll events itself and use it for navigate pictures by mouse wheel. other app I often use either don't support hi-res wheel or don't support navigate pictures by mouse wheel, which don't have this issue, so I pr here.

This honestly sounds counter-productive to me and I would rather suggest to add this to libinput or display server.

about libinput https://gitlab.freedesktop.org/libinput/libinput/-/issues/814#note_1593617
https://gitlab.freedesktop.org/libinput/libinput/-/issues/814#note_1593617
they don't think so (ToT) if libinput just provide discrete scroll events, everything will be much easier.

@ilya-fedin
Copy link
Contributor

telegram is the only app I know that synthesizes discrete scroll events itself

Then fix that piece of code instead of hacking here?

@detiam
Copy link
Author

detiam commented Dec 21, 2023

telegram is the only app I know that synthesizes discrete scroll events itself

Then fix that piece of code instead of hacking here?

ok my mistaken, the function handleWheelEvent is for use wheel event discretely, trigger moveToNext() or zoomOut() every when _verticalWheelDelta added 120...

@detiam
Copy link
Author

detiam commented Dec 21, 2023

btw why you call me hacking, the major thing I change is when ever scroll direction changes, moveToNext() or zoomOut() will Immediately been triggered, it's there anything don't fit handleWheelEvent's goal?

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Dec 21, 2023

btw why you call me hacking

If it's not hacking then why do you add a comment explaining that it's a workaround for linux-specific bug in a system library?

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Dec 21, 2023

they don't think so (ToT) if libinput just provide discrete scroll events, everything will be much easier.

It seems it's already fixed in the kernel and mutter according to your screenshot? Why a change in tdesktop is needed then?

@detiam
Copy link
Author

detiam commented Dec 21, 2023

It seems it's already fixed in the kernel and mutter according to your screenshot? Why a change in tdesktop is needed then?

it fixed for mutter and gtk, qt don't have such hi-res event -> low-res event feature builtin, and the function for similar thing in tdesktop handleWheelEvent still have this issue.

@ilya-fedin
Copy link
Contributor

it fixed for mutter

Shouldn't that be enough? If compositor handles that, toolkits don't have to

@detiam
Copy link
Author

detiam commented Dec 21, 2023

Shouldn't that be enough? If compositor handles that, toolkits don't have to

because I'm using X11?

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Dec 21, 2023

qt don't have such hi-res event -> low-res event feature builtin

It seems it has, in the QAbstractSlider class (QAbstractSliderPrivate::scrollByDelta). So if you want to re-use it, you can instantiate an instance of it or QScrollBar (which inherits QAbstractSlider), forward the wheel event to it and use some of the signals: https://doc.qt.io/qt-6/qabstractslider.html#signals

because I'm using X11?

Shouldn't we just wait for X11 to fix it?

@detiam
Copy link
Author

detiam commented Dec 22, 2023

  1. ok..
  2. I install wayland today and tested on it, problem still, so I open an issue for this in case anyone have better non-hacking way to resolve it.

@ilya-fedin
Copy link
Contributor

Just to be clear, there's no decision on your PR, it will be done by @john-preston. Yet I recommend to report this to your compositor which is apparently kwin according to your issue (at least because he has little spare time and may be unable to review your PR as fast as you would like).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants