summaryrefslogtreecommitdiffstats
path: root/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2018-08-30 09:31:33 +0200
committerJohan Helsing <johan.helsing@qt.io>2018-09-04 11:05:54 +0000
commit192b2e8f59e7f0cb3c2d482524bf171a81a213c5 (patch)
tree64420e2b106e86198ea184e74c34c2e35783ad29 /src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
parent54285dd5f6a660ce0ddd45b222d6c4dcd8ea6f74 (diff)
Fix regression in QWaylandGlContext::makeCurrent for offscreen surfaces
[ChangeLog][QPA plugin] Fixed a bug where offscreen surfaces would get surfaceless EGL contexts. Fixes a regression in in bf09c7a1. The call, window->updateSurface(window->isExposed()), is problematic because offscreen textures are never exposed, and consequently, eglSurface will be EGL_NO_SURFACE, which will then create a surfaceless context in the call: eglMakeCurrent(m_eglDisplay, eglSurface, eglSurface, m_context) This reverts to the old behavior of always trying to create an EGL surface, unless the window doesn't have a valid wl_surface, in which case it doesn't make sense (which is what bf09c7a1 fixed, QTBUG-65553). Task-number: QTBUG-70242 Task-number: QTBUG-68605 Task-number: QTBUG-67601 Change-Id: I44b07bb8bf4b33c73c6379a1de8e9e5cfd220b51 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp')
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp2
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 8b0fb638e..4f2aa8af5 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
@@ -412,7 +412,7 @@ bool QWaylandGLContext::makeCurrent(QPlatformSurface *surface)
window->createDecoration();
if (eglSurface == EGL_NO_SURFACE) {
- window->updateSurface(window->isExposed());
+ window->updateSurface(true);
eglSurface = window->eglSurface();
}