Bug 429930 - Mouse scroll doesn't work when Alt+Tab to XWayland windows
Summary: Mouse scroll doesn't work when Alt+Tab to XWayland windows
Status: RESOLVED FIXED
Alias: None
Product: kwayland
Classification: Frameworks and Libraries
Component: server (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR major
Target Milestone: ---
Assignee: Martin Flöser
URL: https://invent.kde.org/plasma/kwaylan...
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-02 15:11 UTC by Andrey
Modified: 2020-12-14 21:18 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
WAYLAND_DEBUG=1 (58.24 KB, text/plain)
2020-12-02 15:44 UTC, Andrey
Details
WAYLAND_DEBUG=1 startplasma-wayland (3.81 MB, text/x-log)
2020-12-02 16:16 UTC, Andrey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey 2020-12-02 15:11:28 UTC
SUMMARY
Different X apps in Wayland session start behave strange when Alt+Tab to them - mostly, mouse scroll doesn't work properly.
To make it work, Esc or any other key press is enough.
It seems Alt release event doesn't occur on Alt+Tab switch to XWayland windows.

Sample apps suffered: FF, Qt Creator.

STEPS TO REPRODUCE
switch with Alt+Tab from any Wayland window to FF X window and try to mouse scroll there

OBSERVED RESULT
Scrolling doesn't work.
Instead, if browsing history is present for the tab, it will go back/forth by pages in the history on mouse wheel rotation.

EXPECTED RESULT
Scrolling works as usual.

SOFTWARE/OS VERSIONS
compiled from master
Comment 1 Andrey 2020-12-02 15:44:17 UTC
Created attachment 133813 [details]
WAYLAND_DEBUG=1

Here is konsole run with WAYLAND_DEBUG=1 log and then switching to FF window, unsuccessful scroll there, then Esc and successful scroll after.
Comment 2 Andrey 2020-12-02 16:16:56 UTC
Created attachment 133814 [details]
WAYLAND_DEBUG=1 startplasma-wayland
Comment 4 Bug Janitor Service 2020-12-04 16:36:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwayland-server/-/merge_requests/141
Comment 5 David Edmundson 2020-12-14 21:18:04 UTC
Git commit f67daa0711584058a8fefda76e898fe58d53ace7 by David Edmundson, on behalf of Andrey Butirsky.
Committed on 14/12/2020 at 17:09.
Pushed by davidedmundson into branch 'master'.

keyboard_interface: Always update modifiers cache

We send modifiers to the active client when they change, and when we
focus an existing client we send the cached state.

For this reason it's important we always update our internal store of
modifiers regardless of whether a surface is currently active.

Unit test is adopted accordingly.

M  +7    -4    autotests/client/test_wayland_seat.cpp
M  +5    -3    src/server/keyboard_interface.cpp

https://invent.kde.org/plasma/kwayland-server/commit/f67daa0711584058a8fefda76e898fe58d53ace7