diff options
| author | David Edmundson <[email protected]> | 2025-10-01 10:37:05 +0100 |
|---|---|---|
| committer | Qt Cherry-pick Bot <[email protected]> | 2025-10-01 22:08:14 +0000 |
| commit | dd3d2bb9269197565c6ed8cd8cd3b74ec800092a (patch) | |
| tree | c81c7555857fc83dde109880d3c5f765f9bcd186 /src/plugins/platforms/wayland/qwaylandshmwindow.cpp | |
| parent | 7f1250e69c479c42f1e0e4d497486d8823e96d2d (diff) | |
wayland: Fix opaque backgrounds on client side decorations
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: 6.10
Change-Id: If8009444801bc92ebdf8a8ecb1cf9fbadb549532
Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
Reviewed-by: Liang Qi <[email protected]>
(cherry picked from commit 5a8637e4516bc48a0b3f4b5ec3b18618b92e7222)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylandshmwindow.cpp')
| -rw-r--r-- | src/plugins/platforms/wayland/qwaylandshmwindow.cpp | 6 |
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; } } |
