summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGiulio Camuffo <giulio.camuffo@kdab.com>2016-07-02 10:46:58 +0200
committerPaul Olav Tvete <paul.tvete@qt.io>2016-11-17 15:28:24 +0000
commit5b807802866c8df00cb3340d4f9bcc343be5973a (patch)
tree0fe08bebff92ebc5cf708ce97ede8a4e422399af /tests
parent12f2e1e23fc1de16a42d3024561c0f839f9e96cd (diff)
Create and destroy the shell surface when showing and hiding
This changes the shell surface handling for windows, and instead of creating the shell surface at initialization time, and then attaching a null buffer to hide it, it creates the shell surface on setVisible(true), and destroys it on setVisible(false). This fixes hiding when using xdg_shell, as that interface defines that attaching a null buffer to an xdg_surface is an error. Also this should help with bugged EGL drivers which attach a buffer after eglSwapBuffers() returns, which used to cause a newly hidden window to get a new valid buffer after we attached a null one, showing it again. Task-number: QTBUG-47902 Change-Id: I8e0a0442319a98cc1361803ea7be1d079b36fc8c Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/client/client/tst_client.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/client/client/tst_client.cpp b/tests/auto/client/client/tst_client.cpp
index 74363ef5f..6aad25bb4 100644
--- a/tests/auto/client/client/tst_client.cpp
+++ b/tests/auto/client/client/tst_client.cpp
@@ -248,8 +248,8 @@ void tst_WaylandClient::backingStore()
window.hide();
- // hiding the window should detach the buffer
- QTRY_VERIFY(surface->image.isNull());
+ // hiding the window should destroy the surface
+ QTRY_VERIFY(!compositor->surface());
}
class DndWindow : public QWindow