path: root/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
diff options
authorJohan Klokkhammer Helsing <>2018-09-25 14:12:08 +0200
committerJohan Helsing <>2018-09-26 07:44:28 +0000
commiteddf343b3d2bd0c9b19cafc5e055f415a09592c6 (patch)
treeaed91e68a4964f4f17b2282d1ce22c68b087eda2 /src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
parent73edf04050b70093ad3dbf664dbdaa42ddf0bfda (diff)
Client: Fix deadlock for xdg-shell when makeCurrent is called early
If makeCurrent was called before the window was exposed, it would disable resizing, which would block the window from applying the configure which the client needs to ack in order to be exposed. Fixes the issue by locking resizing only if the window is exposed. Change-Id: I0e6b30bc4b08886fb95d502cac0b735d4bb732d2 Fixes: QTBUG-70646 Reviewed-by: Paul Olav Tvete <>
Diffstat (limited to 'src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp')
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
index 1467d8c9..e58403ad 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
@@ -402,7 +402,8 @@ bool QWaylandGLContext::makeCurrent(QPlatformSurface *surface)
if (!window->needToUpdateContentFBO() && (eglSurface != EGL_NO_SURFACE && eglGetCurrentContext() == m_context && eglGetCurrentSurface(EGL_DRAW) == eglSurface))
return true;
- window->setCanResize(false);
+ if (window->isExposed())
+ window->setCanResize(false);
// Core profiles mandate the use of VAOs when rendering. We would then need to use one
// in DecorationsBlitter, but for that we would need a QOpenGLFunctions_3_2_Core instead
// of the QOpenGLFunctions we use, but that would break when using a lower version context.