diff options
author | David Edmundson <davidedmundson@kde.org> | 2018-01-03 19:18:42 +0000 |
---|---|---|
committer | David Edmundson <davidedmundson@kde.org> | 2018-01-16 15:20:14 +0000 |
commit | bf09c7a1493c01a65ee0f110b37a04e653edc08e (patch) | |
tree | d851c752abece83be21ee3a5950e75886433c18e /src | |
parent | ec029b1a4c104c2400da23d4f5f04d7f03731beb (diff) |
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
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp index 2a9e39ed6..f4dd6f492 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(); } |