GithubHelp home page GithubHelp logo

Mouse wheel distance/speed about lan-mouse HOT 7 OPEN

xf- avatar xf- commented on August 26, 2024
Mouse wheel distance/speed

from lan-mouse.

Comments (7)

feschber avatar feschber commented on August 26, 2024 2

I've tried pretty much anything but unfortunately there seems to be a bug with the KDE remote desktop portal implementation.

It might just be that they report 0 discrete scroll steps here: https://invent.kde.org/plasma/kwin/-/blame/master/src/backends/fakeinput/fakeinputbackend.cpp#L153

Basically there is two kinds of scroll events: Axis and AxisDiscrete120.
Axis is for touchpads and given in pixels, while AxisDiscrete120 is given in wheelsteps with each step being equal to 120 in value.

Now the xdg-desktop-portal-kde, which is being used here calls to the fake_input protocol:
https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/blob/master/src/remotedesktop.cpp?ref_type=heads#L322
https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/blob/master/src/waylandintegration.cpp?ref_type=heads#L414
while translating discrete scroll events into fakeinput "Axis" events which are handled in kwin:

https://invent.kde.org/plasma/kwin/-/blame/master/src/backends/fakeinput/fakeinputbackend.cpp#L132

Kwin calls to pointerAxisChanged while setting discrete Scrolling steps to 0...

So all of this seems to be fundamentally broken in KWIN itself and I fear there is nothing I can do right now to fix it.

I will however make sure to report it upstream

from lan-mouse.

feschber avatar feschber commented on August 26, 2024

What desktop? KDE?

from lan-mouse.

xf- avatar xf- commented on August 26, 2024

What desktop? KDE?

Yes on both. Like I wrote in the other issue, reverting the change helps.

from lan-mouse.

xf- avatar xf- commented on August 26, 2024

THX for your work. I still have my patched build and it works.

from lan-mouse.

feschber avatar feschber commented on August 26, 2024

THX for your work. I still have my patched build and it works.

It's not perfect though, right? In firefox, at least from my testing it always jumped around a bit and did not scroll smoothly (instead jumping to the next possition directly).
Regardless, I can see if I can replicate the behaviour to what your patch looks like as closely as possible.

Do you mean the state before e21ab02 or the current master with e21ab02 reverted?

from lan-mouse.

xf- avatar xf- commented on August 26, 2024

THX for your work. I still have my patched build and it works.

It's not perfect though, right? In firefox, at least from my testing it always jumped around a bit and did not scroll smoothly (instead jumping to the next possition directly). Regardless, I can see if I can replicate the behaviour to what your patch looks like as closely as possible.

Do you mean the state before e21ab02 or the current master with e21ab02 reverted?

Yeah, it is more or less the old function. It inverts the scrolling, but the speed is normal. So no 120 implementation. I use current release with reverting to this without 120
e21ab02#diff-c04e25924525b7dc3115df2f79d08fd1eecbbd91bf16f575fcba89e885205f05L737-L772

from lan-mouse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.