summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wayland/qwaylandshmwindow.cpp
diff options
context:
space:
mode:
authorDavid Edmundson <davidedmundson@kde.org>2025-10-01 10:37:05 +0100
committerDavid Edmundson <davidedmundson@kde.org>2025-10-01 16:47:50 +0100
commit5a8637e4516bc48a0b3f4b5ec3b18618b92e7222 (patch)
tree9a5ace8aba112f67738d7b53bb290b771257800b /src/plugins/platforms/wayland/qwaylandshmwindow.cpp
parentdb3b8e36c9084ddaba6ae6ecc36dbcc846c4c649 (diff)
wayland: Fix opaque backgrounds on client side decorationsv6.10.06.10.0
QWaylandSHMWindow needs to react to decorations being created to adjust the surface format. Rather than guessing when the decoration is created based on the window flags changing, introduce an explicit hook on the main window class. Ammends 12e55c95b23c766f9b968597fcf651173e78944c. Fixes: QTBUG-136110 Pick-to: dev 6.10 Change-Id: If8009444801bc92ebdf8a8ecb1cf9fbadb549532 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylandshmwindow.cpp')
-rw-r--r--src/plugins/platforms/wayland/qwaylandshmwindow.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandshmwindow.cpp b/src/plugins/platforms/wayland/qwaylandshmwindow.cpp
index 10c90d1c157..c102ae11336 100644
--- a/src/plugins/platforms/wayland/qwaylandshmwindow.cpp
+++ b/src/plugins/platforms/wayland/qwaylandshmwindow.cpp
@@ -31,13 +31,15 @@ QWaylandWindow::WindowType QWaylandShmWindow::windowType() const
return QWaylandWindow::Shm;
}
-void QWaylandShmWindow::setWindowFlags(Qt::WindowFlags flags)
+bool QWaylandShmWindow::createDecoration()
{
- QWaylandWindow::setWindowFlags(flags);
+ bool rc = QWaylandWindow::createDecoration();
const QSurfaceFormat format = window()->requestedFormat();
if (!format.hasAlpha())
mSurfaceFormat.setAlphaBufferSize(mWindowDecorationEnabled ? 8 : 0);
+
+ return rc;
}
}