Bug 417444 - Mouse input to GTK apps on XWayland is missplaced
Summary: Mouse input to GTK apps on XWayland is missplaced
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.18.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL: https://phabricator.kde.org/D27375
Keywords:
: 416546 417669 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-02-11 18:54 UTC by Matej Mrenica
Modified: 2020-06-09 15:30 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.18.1
Sentry Crash Report:
vlad.zahorodnii: ReviewRequest+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matej Mrenica 2020-02-11 18:54:36 UTC
SUMMARY
To interact with something you have to move your mouse a little down and to the right.
Three examples:

(1)Open https://sketch.io/sketchpad/ in Firefox and try to draw something. You can clearly see the line is not created under the cursor, but about 20px (may vary) up and to the left.

(2)OR try clicking on anything. Clicking on the window buttons (close, minimize,maximize) doesn't work because the clicks land somewhere else.

(3)OR try to resize a window. It's impossible to resize a window on the right side and at the bottom. The "edge" of the window on top and on the left side is moved a little inside the window. 


SOFTWARE/OS VERSIONS
KDE Frameworks Version: 5.67.0
Qt Version: 5.14.1
Comment 1 Matej Mrenica 2020-02-13 20:10:02 UTC
The proposed patch fixes this.
Comment 2 Vlad Zahorodnii 2020-02-13 23:52:21 UTC
Git commit 1181af2cd16569fb93680de352a4c050533bffff by Vlad Zahorodnii.
Committed on 13/02/2020 at 23:49.
Pushed by vladz into branch 'Plasma/5.18'.

Provide input geometry and input transformation matrix for Xwayland clients

Summary:
We need to provide the input geometry and the input transformation
matrix for Xwayland clients in order to make sure that input events
are correctly mapped from the global screen coordinates to the
screen-local coordinates.
FIXED-IN: 5.18.1

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

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

M  +115  -12   autotests/integration/xwayland_input_test.cpp
M  +16   -0    x11client.cpp
M  +3    -0    x11client.h

https://commits.kde.org/kwin/1181af2cd16569fb93680de352a4c050533bffff
Comment 3 Vlad Zahorodnii 2020-02-14 00:04:37 UTC
(In reply to mthw0 from comment #1)
> The proposed patch fixes this.

Thank you for testing it.
Comment 4 Nate Graham 2020-02-15 23:53:55 UTC
*** Bug 417669 has been marked as a duplicate of this bug. ***
Comment 5 Patrick Silva 2020-02-18 22:39:55 UTC
*** Bug 416546 has been marked as a duplicate of this bug. ***
Comment 6 magiblot 2020-06-09 15:30:58 UTC
There are still misplacing issues. For instance:

1. Have an unmaximized Firefox window -> OK
2. Maximize Firefox -> KO
3. Click on another window and then click back on maximized Firefox -> OK