Bug 404152 - Support for pointer_axis_discrete needed
Summary: Support for pointer_axis_discrete needed
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: input (show other bugs)
Version: 5.14.90
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Vlad Zahorodnii
URL:
Keywords:
: 410157 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-02-09 20:29 UTC by Matej Mrenica
Modified: 2019-07-25 22:59 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.17.0
mgraesslin: Wayland+
mgraesslin: X11-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matej Mrenica 2019-02-09 20:29:04 UTC
STEPS TO REPRODUCE
1. Open Firefox, Chromium, or even Minecraft

OBSERVED RESULT
scroll once - > content moves by one line
scroll again - > content moves by two lines
scroll again - > content moves by one line
...
etc.

EXPECTED RESULT
Every 'scroll' should trigger the scrolling action exactly once

SOFTWARE/OS VERSIONS
KDE Frameworks Version: 5.54
Qt Version: 5.12.1

ADDITIONAL INFORMATION
This issue isn't present on Gnome Wayland and was fixed in Xwayland by https://gitlab.freedesktop.org/xorg/xserver/commit/cd285922cdec966825e47220b1182a57abc1ff90 but this still happens on Plasma Wayland
Comment 1 pmargeti34 2019-02-09 22:15:18 UTC
Confirming, happens under 5.14.5 as well.
Easily reproducible on firefox tabs where a single mouse wheel turn flips 2 tabs.
Comment 2 tromzy 2019-02-11 11:35:14 UTC
Can confirm. On Firefox I think you can work around it by disabling "Smooth scrolling".
Comment 3 Matej Mrenica 2019-02-11 11:50:59 UTC
(In reply to tromzy from comment #2)
> Can confirm. On Firefox I think you can work around it by disabling "Smooth
> scrolling".

Yes, you can, but you don't want to look for workarounds for every app.
Comment 4 wychmire 2019-02-11 22:20:36 UTC
(In reply to tromzy from comment #2)
> Can confirm. On Firefox I think you can work around it by disabling "Smooth
> scrolling".

Still happens to me even after disabling Smooth Scrolling, but it's definitely less noticeable.
Comment 5 JordanL 2019-04-01 12:35:43 UTC
This is still happening in Plasma/Wayland 5.15.3 (KF 5.56.0) in Chrome and Minecraft (not tested Firefox). It's not happening in Konsole, so appears to be happening to Xwayland apps. I'm on Xorg 1.20.4.
Comment 6 Vlad Zahorodnii 2019-04-01 19:31:32 UTC
The fix is still under review.
Comment 7 JordanL 2019-04-06 12:48:13 UTC
I understand it's important for problems to be fixed properly rather than hastily, and I don't want to sound impatient, but is it normal for a fix like this to be under review for nearly two months? Having buggy scrolling in a lot of apps is at least a moderate usability hindrance. I'd just feel a tad better if I knew the fix was on its way :)
Comment 8 Vlad Zahorodnii 2019-04-06 12:56:23 UTC
Long story short: there's lack of man power.
Comment 9 Nate Graham 2019-04-09 16:08:06 UTC
(In reply to JordanL from comment #7)
> I understand it's important for problems to be fixed properly rather than
> hastily, and I don't want to sound impatient, but is it normal for a fix
> like this to be under review for nearly two months?
Yep. As Vlad mentioned, KDE is chronically short of manpower--particular for code review, and particularly for KWin-related patches. Put simply: the number of people capable of reviewing KWin patches is not high. If you have any relevant experience, getting involved in this would be an enormous boon for everyone.
Comment 10 JordanL 2019-04-09 16:37:57 UTC
Certainly not enough to provide a competent review of Kwin code unfortunately. I've checked out the Kwin repo anyway to see if I might familiarise myself with it enough to offer patches for some issues I can reproduce.
Comment 11 Nate Graham 2019-04-09 17:48:06 UTC
Thanks Jordan, that would be awesome! If you run into any issues, head to the #kde-devel channel on Freenode IRC or Matrix (see https://community.kde.org/Get_Involved/development#Communicate_with_the_team)
Comment 12 Vlad Zahorodnii 2019-05-17 08:54:01 UTC
Git commit ddff2c06d17a8b80bb30faef02d7fa1251208ba8 by Vlad Zagorodniy.
Committed on 17/05/2019 at 08:52.
Pushed by vladz into branch 'master'.

Allow compositors to send discrete axis values

Summary:
So far not all v5 features were implemented because most of them are
optional. But given that XWayland needs axis_discrete event maybe it's
time to implement them.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, mthw, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D18933

M  +98   -0    autotests/client/test_wayland_seat.cpp
M  +40   -22   src/client/pointer.cpp
M  +25   -0    src/client/pointer.h
M  +48   -0    src/server/pointer_interface.cpp
M  +3    -0    src/server/pointer_interface.h
M  +14   -0    src/server/seat_interface.cpp
M  +42   -0    src/server/seat_interface.h

https://commits.kde.org/kwayland/ddff2c06d17a8b80bb30faef02d7fa1251208ba8
Comment 13 Vlad Zahorodnii 2019-05-17 09:06:41 UTC
Git commit 7f593a67adbd62cd7f767f41abd8b3bbd50b174d by Vlad Zagorodniy.
Committed on 17/05/2019 at 09:06.
Pushed by vladz into branch 'master'.

Send axis_source, axis_discrete, and axis_stop

Summary:
So far KWin didn't send axis_source, axis_discrete, and axis_stop. Even
though most of those events are optional, clients need them to work as
expected. For example, one needs axis_source and axis_stop to implement
kinetic scrolling; Xwayland needs axis_discrete to prevent multiple
scroll events when the compositor sends axis deltas greater than 10, etc.
FIXED-IN: 5.17.0

Test Plan:
* Content of a webpage in Firefox is moved by one line per each mouse
  wheel "click";
* Scrolled gedit using 2 fingers on GNOME Shell, sway, and KDE Plasma;
  in all three cases wayland debug looked the same (except diagonal scroll
  motions).

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19000

M  +1    -1    autotests/libinput/CMakeLists.txt
M  +10   -4    autotests/libinput/input_event_test.cpp
M  +14   -0    autotests/libinput/mock_libinput.cpp
M  +3    -0    autotests/libinput/mock_libinput.h
M  +26   -3    autotests/libinput/pointer_event_test.cpp
M  +25   -5    input.cpp
M  +10   -1    input.h
M  +7    -2    input_event.cpp
M  +27   -2    input_event.h
M  +4    -25   libinput/connection.cpp
M  +2    -1    libinput/connection.h
M  +26   -0    libinput/events.cpp
M  +2    -0    libinput/events.h
M  +4    -5    platform.cpp
M  +6    -3    platform.h
M  +1    -0    plugins/platforms/wayland/wayland_backend.cpp
M  +2    -2    plugins/platforms/x11/windowed/x11windowed_backend.cpp
M  +5    -6    pointer_input.cpp
M  +2    -1    pointer_input.h

https://commits.kde.org/kwin/7f593a67adbd62cd7f767f41abd8b3bbd50b174d
Comment 14 Matej Mrenica 2019-05-17 09:18:55 UTC
Could this still make it into Plasma 5.16? It is still almost a month away and Plasma 5.17 is almost 5 months away.
Comment 15 Vlad Zahorodnii 2019-05-17 09:47:09 UTC
No, 5.16 depends on KF 5.58, see https://community.kde.org/Schedules/Plasma_5
Comment 16 Matej Mrenica 2019-05-17 12:59:59 UTC
(In reply to Vlad Zagorodniy from comment #15)
> No, 5.16 depends on KF 5.58, see https://community.kde.org/Schedules/Plasma_5

OK, so this (kwin) patch would break Kwin if there wasn't also the code from the kwayland patch in a system?
Comment 17 Vlad Zahorodnii 2019-05-17 13:19:42 UTC
Yes.
Comment 18 Vlad Zahorodnii 2019-05-17 13:21:19 UTC
... though if you use Arch, you could package kwin and kwayland on your own. Packaging on Arch is pretty easy.
Comment 19 Matej Mrenica 2019-05-17 13:28:44 UTC
(In reply to Vlad Zagorodniy from comment #18)
> ... though if you use Arch, you could package kwin and kwayland on your own.
> Packaging on Arch is pretty easy.

I am very likely going to. 

Just a thought, looking at the schedules, frameworks 5.59 will most likely be released before Plasma 5.16.0 so I would say that a system with Plasma 5.16.0 will also already have frameworks 5.59, or so it would seem (at least on Arch). Thus nothing should break because of this, right?
Comment 20 Vlad Zahorodnii 2019-05-17 13:42:47 UTC
Yes, Arch Linux users would need to patch only kwin when KF 5.59 is released.
Comment 21 Patrick Silva 2019-07-25 22:59:10 UTC
*** Bug 410157 has been marked as a duplicate of this bug. ***