From 038509e603a7c0b8628f8e88b7e9963297ac9122 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sat, 28 Sep 2019 16:45:13 +0300 Subject: [PATCH] [wayland] Provide correct input transformation matrix for client-side decorated clients Summary: Pointer events must be in surface-local coordinates, not window geometry. Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: kwin Tags: #kwin Maniphest Tasks: T10867 Differential Revision: https://phabricator.kde.org/D24456 --- xdgshellclient.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xdgshellclient.cpp b/xdgshellclient.cpp index aa8bfcc6fa..a8def39ef1 100644 --- a/xdgshellclient.cpp +++ b/xdgshellclient.cpp @@ -1789,9 +1789,9 @@ void XdgShellClient::doResizeSync() QMatrix4x4 XdgShellClient::inputTransformation() const { - QMatrix4x4 m = Toplevel::inputTransformation(); - m.translate(-borderLeft(), -borderTop()); - return m; + QMatrix4x4 matrix; + matrix.translate(-m_bufferGeometry.x(), -m_bufferGeometry.y()); + return matrix; } void XdgShellClient::installServerSideDecoration(KWayland::Server::ServerSideDecorationInterface *deco)