diff options
Diffstat (limited to 'src/hardwareintegration/compositor/xcomposite-egl')
-rw-r--r-- | src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp | 18 | ||||
-rw-r--r-- | src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h | 2 |
2 files changed, 13 insertions, 7 deletions
diff --git a/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp b/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp index 3cf51a8de..3c302c7f6 100644 --- a/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp +++ b/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp @@ -62,20 +62,26 @@ XCompositeEglClientBufferIntegration::XCompositeEglClientBufferIntegration() } -void XCompositeEglClientBufferIntegration::initializeHardware(struct ::wl_display *) +bool XCompositeEglClientBufferIntegration::initializeHardware(struct ::wl_display *) { QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface(); if (nativeInterface) { mDisplay = static_cast<Display *>(nativeInterface->nativeResourceForIntegration("Display")); - if (!mDisplay) - qFatal("could not retrieve Display from platform integration"); + if (!mDisplay) { + qCWarning(qLcWaylandCompositorHardwareIntegration) << "could not retrieve Display from platform integration"; + return false; + } mEglDisplay = static_cast<EGLDisplay>(nativeInterface->nativeResourceForIntegration("EGLDisplay")); - if (!mEglDisplay) - qFatal("could not retrieve EGLDisplay from platform integration"); + if (!mEglDisplay) { + qCWarning(qLcWaylandCompositorHardwareIntegration) << "could not retrieve EGLDisplay from platform integration"; + return false; + } } else { - qFatal("Platform integration doesn't have native interface"); + qCWarning(qLcWaylandCompositorHardwareIntegration) << "Platform integration doesn't have native interface"; + return false; } new XCompositeHandler(m_compositor, mDisplay); + return true; } QtWayland::ClientBuffer *XCompositeEglClientBufferIntegration::createBufferFor(wl_resource *buffer) diff --git a/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h b/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h index 80ce88b5f..2c3116df1 100644 --- a/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h +++ b/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h @@ -45,7 +45,7 @@ class XCompositeEglClientBufferIntegration : public QtWayland::ClientBufferInteg public: XCompositeEglClientBufferIntegration(); - void initializeHardware(struct ::wl_display *display) override; + bool initializeHardware(struct ::wl_display *display) override; QtWayland::ClientBuffer *createBufferFor(wl_resource *buffer) override; inline Display *xDisplay() const { return mDisplay; } inline EGLDisplay eglDisplay() const { return mEglDisplay; } |