Marco should workaround invalid scroll event caused by mistake in X11/XInput 2.1 protocol design
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
marco (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
#### Steps to reproduce the behaviour
Preparations: Open Firefox and Chrome windows in maximized state and switch between the windows using alt-tab while the mouse cursor is above the content area. Load a long web page to both browsers and scroll near the middle of document in both Firefox and Chrome.
1. Switch to Chrome using alt-tab.
2. Scroll downwards with a couple of clicks on mouse wheel.
3. Keep mouse cursor above the browser content area and press Alt+tab to switch to Firefox.
4. Scroll downwards a lot using mouse wheel.
5. Switch back to Chrome using alt+tab
6. Scroll downwards one click using mouse wheel.
#### Expected behaviour
Chrome should scroll the usual amount.
#### Actual behaviour
Chrome scrolls roughly the same amount Firefox was scrolled while Firefox was active!
#### Package version
$ apt policy mate-desktop marco
mate-desktop:
Installed: 1.24.0-2
Candidate: 1.24.0-2
Version table:
*** 1.24.0-2 500
500 http://
100 /var/lib/
marco:
Installed: 1.24.0-1ubuntu1
Candidate: 1.24.0-1ubuntu1
Version table:
*** 1.24.0-1ubuntu1 500
500 http://
100 /var/lib/
#### Linux Distribution
$ lsb_release -a
LSB Version: core-11.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal
#### Additional information
The issue is caused by design problem in X11/XInput 2.1 protocol which causes first scroll event to have non-sensible scroll event data after switching windows using alt+tab. GTK has implemented workaround at the library level but it blindly assumes that the first event is broken. If first event gets ever changed to contain actual data, it's still ignored in the future. As such, implementing the workaround on window manager makes more sense because window manager is expected to keep track of window focus and it has the best information which event should be ignored or worked around.
I've reported this as Chromium bug at https:/
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: marco 1.24.0-1ubuntu1
ProcVersionSign
Uname: Linux 5.15.0-
NonfreeKernelMo
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: MATE
Date: Tue May 2 22:13:17 2023
EcryptfsInUse: Yes
InstallationDate: Installed on 2019-01-05 (1578 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
SourcePackage: marco
UpgradeStatus: Upgraded to focal on 2022-09-13 (231 days ago)
modified.
mtime.conffile.