diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2018-11-06 15:12:07 +0100 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@qt.io> | 2019-01-08 16:35:50 +0000 |
commit | 657b6ce0677e05984a2f11900c66dbca775ff313 (patch) | |
tree | 1fae3a3ae6f3ec84094f1d6c1f8f14542a54d2df /src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp | |
parent | 280cc2befba99ffde25fe7c287174143a9539d32 (diff) | |
download | qtwayland-657b6ce0677e05984a2f11900c66dbca775ff313.tar.gz |
Fix black client windows when not using window decorations on NVIDIA
QWaylandGlContext::makeCurrent() tries to be smart and only call
eglMakeCurrent() if really needed. This causes problems on NVIDIA where
the call is always needed.
Change-Id: I08d881d69f79a0fd4ea83a65780052e269a566be
Task-number: QTBUG-71697
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.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp index e58403ad..a8ee9a43 100644 --- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp +++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp @@ -399,8 +399,13 @@ bool QWaylandGLContext::makeCurrent(QPlatformSurface *surface) QWaylandEglWindow *window = static_cast<QWaylandEglWindow *>(surface); EGLSurface eglSurface = window->eglSurface(); - if (!window->needToUpdateContentFBO() && (eglSurface != EGL_NO_SURFACE && eglGetCurrentContext() == m_context && eglGetCurrentSurface(EGL_DRAW) == eglSurface)) + if (!window->needToUpdateContentFBO() && (eglSurface != EGL_NO_SURFACE)) { + if (!eglMakeCurrent(m_eglDisplay, eglSurface, eglSurface, m_context)) { + qWarning("QWaylandGLContext::makeCurrent: eglError: %x, this: %p \n", eglGetError(), this); + return false; + } return true; + } if (window->isExposed()) window->setCanResize(false); |