diff --git a/src/window.cpp b/src/window.cpp index a60f154ad9..c985c503c6 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -381,7 +381,7 @@ QRegion Window::inputShape() const QMatrix4x4 Window::inputTransformation() const { QMatrix4x4 m; - m.translate(-x(), -y()); + m.translate(-m_bufferGeometry.x(), -m_bufferGeometry.y()); return m; } @@ -419,7 +419,7 @@ QRectF Window::inputGeometry() const if (isDecorated()) { return frameGeometry() + decoration()->resizeOnlyBorders(); } - return frameGeometry(); + return bufferGeometry(); } bool Window::isLocalhost() const diff --git a/src/window.h b/src/window.h index a5259abc68..3abbc6894f 100644 --- a/src/window.h +++ b/src/window.h @@ -800,11 +800,8 @@ public: /** * @returns Transformation to map from global to window coordinates. - * - * Default implementation returns a translation on negative pos(). - * @see pos */ - virtual QMatrix4x4 inputTransformation() const; + QMatrix4x4 inputTransformation() const; /** * Returns @c true if the window can accept input at the specified position @a point. diff --git a/src/x11window.cpp b/src/x11window.cpp index 31ef74dcb2..cce665e59d 100644 --- a/src/x11window.cpp +++ b/src/x11window.cpp @@ -2800,15 +2800,6 @@ xcb_window_t X11Window::wrapperId() const return m_wrapper; } -QRectF X11Window::inputGeometry() const -{ - // Notice that the buffer geometry corresponds to the geometry of the frame window. - if (isDecorated()) { - return m_bufferGeometry + decoration()->resizeOnlyBorders(); - } - return m_bufferGeometry; -} - QPointF X11Window::framePosToClientPos(const QPointF &point) const { qreal x = point.x(); @@ -2890,13 +2881,6 @@ QSizeF X11Window::implicitSize() const return clientSizeToFrameSize(m_client.geometry().size()); } -QMatrix4x4 X11Window::inputTransformation() const -{ - QMatrix4x4 matrix; - matrix.translate(-m_bufferGeometry.x(), -m_bufferGeometry.y()); - return matrix; -} - pid_t X11Window::pid() const { return info->pid(); diff --git a/src/x11window.h b/src/x11window.h index ec6ffd4973..d67342d340 100644 --- a/src/x11window.h +++ b/src/x11window.h @@ -87,8 +87,6 @@ public: xcb_window_t wmClientLeader() const; QString wmCommand(); - QRectF inputGeometry() const override; - QPointF framePosToClientPos(const QPointF &point) const override; QPointF clientPosToFramePos(const QPointF &point) const override; QSizeF frameSizeToClientSize(const QSizeF &size) const override; @@ -102,7 +100,6 @@ public: QRegion opaqueRegion() const; QVector shapeRegion() const; - QMatrix4x4 inputTransformation() const override; pid_t pid() const override; QString windowRole() const override; diff --git a/src/xdgshellwindow.cpp b/src/xdgshellwindow.cpp index 277206e5fb..f1a5a8b5e3 100644 --- a/src/xdgshellwindow.cpp +++ b/src/xdgshellwindow.cpp @@ -96,18 +96,6 @@ NET::WindowType XdgSurfaceWindow::windowType(bool direct) const return m_windowType; } -QRectF XdgSurfaceWindow::inputGeometry() const -{ - return isDecorated() ? Window::inputGeometry() : bufferGeometry(); -} - -QMatrix4x4 XdgSurfaceWindow::inputTransformation() const -{ - QMatrix4x4 transformation; - transformation.translate(-bufferGeometry().x(), -bufferGeometry().y()); - return transformation; -} - XdgSurfaceConfigure *XdgSurfaceWindow::lastAcknowledgedConfigure() const { return m_lastAcknowledgedConfigure.get(); diff --git a/src/xdgshellwindow.h b/src/xdgshellwindow.h index bc12b8a67d..5da04e45b1 100644 --- a/src/xdgshellwindow.h +++ b/src/xdgshellwindow.h @@ -60,8 +60,6 @@ public: NET::WindowType windowType(bool direct = false) const override; QRectF frameRectToBufferRect(const QRectF &rect) const override; - QRectF inputGeometry() const override; - QMatrix4x4 inputTransformation() const override; void destroyWindow() override; void installPlasmaShellSurface(KWaylandServer::PlasmaShellSurfaceInterface *shellSurface);