diff options
-rw-r--r-- | src/client/qwaylandwindow.cpp | 7 | ||||
-rw-r--r-- | tests/auto/client/surface/tst_surface.cpp | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 0b4347a8..812373a2 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -953,6 +953,13 @@ bool QWaylandWindow::createDecoration() subsurf->set_position(pos.x() + m.left(), pos.y() + m.top()); } sendExposeEvent(QRect(QPoint(), geometry().size())); + + // This is a special case where the buffer is recreated, but since + // the content rect remains the same, the widgets remain the same + // size and are not redrawn, leaving the new buffer empty. As a simple + // work-around, we trigger a full extra update whenever the client-side + // window decorations are toggled while the window is showing. + window()->requestUpdate(); } return mWindowDecoration; diff --git a/tests/auto/client/surface/tst_surface.cpp b/tests/auto/client/surface/tst_surface.cpp index 60d89132..f65ff08b 100644 --- a/tests/auto/client/surface/tst_surface.cpp +++ b/tests/auto/client/surface/tst_surface.cpp @@ -127,6 +127,10 @@ void tst_surface::waitForFrameCallbackGl() // Make sure we follow frame callbacks for some frames for (int i = 0; i < 5; ++i) { xdgPingAndWaitForPong(); // Make sure things have happened on the client + if (!qEnvironmentVariableIntValue("QT_WAYLAND_DISABLE_WINDOWDECORATION") && i == 0) { + QCOMPARE(bufferSpy.count(), 1); + bufferSpy.removeFirst(); + } exec([&] { QVERIFY(bufferSpy.empty()); // Make sure no extra buffers have arrived QVERIFY(!xdgToplevel()->surface()->m_waitingFrameCallbacks.empty()); |