diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2018-09-25 14:12:08 +0200 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2018-09-26 07:44:28 +0000 |
commit | eddf343b3d2bd0c9b19cafc5e055f415a09592c6 (patch) | |
tree | aed91e68a4964f4f17b2282d1ce22c68b087eda2 | |
parent | 73edf04050b70093ad3dbf664dbdaa42ddf0bfda (diff) | |
download | qtwayland-eddf343b3d2bd0c9b19cafc5e055f415a09592c6.tar.gz |
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 <paul.tvete@qt.io>
-rw-r--r-- | src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp | 3 |
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. |