summaryrefslogtreecommitdiffstats
path: root/src/hardwareintegration
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-09-11 03:01:14 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-09-11 03:01:14 +0200
commit2ed4d4232532a573153a234f913b11fc624b6e9d (patch)
tree89587fffb4e0dbabc84a9805ddb0cc9d8d75e000 /src/hardwareintegration
parente22fececa4e8c29770000e7dd80a8d693e6a6af3 (diff)
parent122123bfa4a65b04884f1d930900cb342fb7741c (diff)
Merge remote-tracking branch 'origin/5.12' into dev
Diffstat (limited to 'src/hardwareintegration')
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp9
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp2
2 files changed, 7 insertions, 4 deletions
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
index 3009f9d63..f10a7469a 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
@@ -133,13 +133,16 @@ void QWaylandEglWindow::updateSurface(bool create)
m_resize = true;
}
- } else if (create) {
- m_waylandEglWindow = wl_egl_window_create(object(), sizeWithMargins.width(), sizeWithMargins.height());
+ } else if (create && wl_surface::isInitialized()) {
+ ::wl_surface *wlSurface = wl_surface::object();
+ m_waylandEglWindow = wl_egl_window_create(wlSurface, sizeWithMargins.width(), sizeWithMargins.height());
}
- if (!m_eglSurface && create) {
+ if (!m_eglSurface && m_waylandEglWindow && create) {
EGLNativeWindowType eglw = (EGLNativeWindowType) m_waylandEglWindow;
m_eglSurface = eglCreateWindowSurface(m_clientBufferIntegration->eglDisplay(), m_eglConfig, eglw, 0);
+ if (Q_UNLIKELY(m_eglSurface == EGL_NO_SURFACE))
+ qCWarning(lcQpaWayland, "Could not create EGL surface (EGL error 0x%x)\n", eglGetError());
}
}
}
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();
}