From 7896853d7c84d289ca6ded33f1c6d90b49ceb95f Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Wed, 10 Jan 2018 08:44:15 +0100 Subject: [PATCH] Add missing patch --- ...-do-not-recreate-hidden-egl-surfaces.patch | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 qtwayland-do-not-recreate-hidden-egl-surfaces.patch diff --git a/qtwayland-do-not-recreate-hidden-egl-surfaces.patch b/qtwayland-do-not-recreate-hidden-egl-surfaces.patch new file mode 100644 index 0000000..0cc0d85 --- /dev/null +++ b/qtwayland-do-not-recreate-hidden-egl-surfaces.patch @@ -0,0 +1,38 @@ +From a343c589a966d0342fcc75e0d6ce24e1f5157540 Mon Sep 17 00:00:00 2001 +From: David Edmundson +Date: Wed, 3 Jan 2018 19:18:42 +0000 +Subject: [PATCH] Don't recreate hidden egl surfaces + +QWaylandEglWindow deletes surfaces when a window changes from hidden to +visible, presumably as a result of us not having a valid wl_surface +object. By extension it doesn't make sense to create a surface whilst a +window is still hidden. + +This fixes a crash where a QQuickWindow hides and then is destroyed. In +QQuickWindow destruction we have to create a valid context in order to +delete any textures/assets owned by the scene graph; as the wl_surface +has gone this causes an error in the EGL libs when we create an EGL +surface. + +Task-number: QTBUG-65553 +Change-Id: I9b37a86326bf2cd7737c4e839c1aa8c74cf08116 +--- + .../client/wayland-egl/qwaylandglcontext.cpp | 2 +- + tests/auto/client/client/tst_client.cpp | 35 ++++++++++++++++++++++ + 2 files changed, 36 insertions(+), 1 deletion(-) + +diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp +index 2a9e39e..f4dd6f4 100644 +--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp ++++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp +@@ -407,7 +407,7 @@ bool QWaylandGLContext::makeCurrent(QPlatformSurface *surface) + window->createDecoration(); + + if (eglSurface == EGL_NO_SURFACE) { +- window->updateSurface(true); ++ window->updateSurface(window->isExposed()); + eglSurface = window->eglSurface(); + } + +-- +2.7.4