diff --git a/src/scene/surfaceitem_wayland.cpp b/src/scene/surfaceitem_wayland.cpp index 30511b0c51..82863c3a45 100644 --- a/src/scene/surfaceitem_wayland.cpp +++ b/src/scene/surfaceitem_wayland.cpp @@ -217,12 +217,9 @@ SurfaceItemXwayland::SurfaceItemXwayland(X11Window *window, Scene *scene, Item * QList SurfaceItemXwayland::shape() const { - const QRectF clipRect = rect() & m_window->clientGeometry().translated(-m_window->bufferGeometry().topLeft()); QList shape = m_window->shapeRegion(); - - // bounded to clipRect for (QRectF &shapePart : shape) { - shapePart = shapePart.intersected(clipRect); + shapePart = shapePart.intersected(rect()); } return shape; } diff --git a/src/x11window.cpp b/src/x11window.cpp index df5e5ba852..14b10e503f 100644 --- a/src/x11window.cpp +++ b/src/x11window.cpp @@ -2872,7 +2872,7 @@ QSizeF X11Window::clientSizeToFrameSize(const QSizeF &size) const QRectF X11Window::frameRectToBufferRect(const QRectF &rect) const { - if (isDecorated()) { + if (!waylandServer() && isDecorated()) { return rect; } return frameRectToClientRect(rect); @@ -4377,10 +4377,10 @@ void X11Window::updateServerGeometry() const QRectF oldBufferGeometry = m_lastBufferGeometry; // Compute the old client rect, the client geometry is always inside the buffer geometry. - QRectF oldClientRect = m_lastClientGeometry; - oldClientRect.translate(-m_lastBufferGeometry.topLeft()); + const QRectF oldClientRect = m_lastClientGeometry.translated(-m_lastBufferGeometry.topLeft()); + const QRectF clientRect = m_clientGeometry.translated(-m_bufferGeometry.topLeft()); - if (oldBufferGeometry.size() != m_bufferGeometry.size() || oldClientRect != QRectF(clientPos(), clientSize())) { + if (oldBufferGeometry.size() != m_bufferGeometry.size() || oldClientRect != clientRect) { resizeDecoration(); // If the client is being interactively resized, then the frame window, the wrapper window, // and the client window have correct geometry at this point, so we don't have to configure @@ -4389,13 +4389,11 @@ void X11Window::updateServerGeometry() m_frame.setGeometry(m_bufferGeometry); } if (!isShade()) { - const QRectF requestedWrapperGeometry(clientPos(), clientSize()); - if (m_wrapper.geometry() != requestedWrapperGeometry) { - m_wrapper.setGeometry(requestedWrapperGeometry); + if (m_wrapper.geometry() != clientRect) { + m_wrapper.setGeometry(clientRect); } - const QRectF requestedClientGeometry(QPoint(0, 0), clientSize()); - if (m_client.geometry() != requestedClientGeometry) { - m_client.setGeometry(requestedClientGeometry); + if (m_client.geometry() != QRectF(QPointF(0, 0), clientRect.size())) { + m_client.setGeometry(QRectF(QPointF(0, 0), clientRect.size())); } // SELI - won't this be too expensive? // THOMAS - yes, but gtk+ clients will not resize without ...