From c214801a23dc76cfdefcacc611ce29044c805b9a Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sat, 30 Jul 2022 18:53:40 +0300 Subject: [PATCH] wayland: Simplify geometry setup code in InternalWindow This weird setup code was needed to work around buggy geometry code a while ago. It fixes the debug console getting offscreen. --- src/internalwindow.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/internalwindow.cpp b/src/internalwindow.cpp index 3b7163de2c..eb5ad30fbf 100644 --- a/src/internalwindow.cpp +++ b/src/internalwindow.cpp @@ -56,11 +56,10 @@ InternalWindow::InternalWindow(QWindow *handle) setupCompositing(); updateColorScheme(); - blockGeometryUpdates(true); + setMoveResizeGeometry(m_handle->geometry()); commitGeometry(m_handle->geometry()); + updateDecoration(true); - moveResize(clientRectToFrameRect(m_handle->geometry())); - blockGeometryUpdates(false); m_handle->installEventFilter(this); } @@ -325,7 +324,7 @@ void InternalWindow::setNoBorder(bool set) void InternalWindow::createDecoration(const QRectF &oldGeometry) { setDecoration(std::shared_ptr(Workspace::self()->decorationBridge()->createDecoration(this))); - moveResize(oldGeometry); + moveResize(QRectF(oldGeometry.topLeft(), clientSizeToFrameSize(clientSize()))); Q_EMIT geometryShapeChanged(this, oldGeometry); }