Files
wowlet/contrib/depends/patches/native_qt/wayland-fix.patch
T
2026-04-20 13:33:56 +02:00

46 lines
2.1 KiB
Diff

From 304e708fe214a7706a3225b61d5d1fd39ca232af Mon Sep 17 00:00:00 2001
From: Liang Qi <liang.qi@qt.io>
Date: Tue, 7 Apr 2026 09:33:43 +0200
Subject: [PATCH] wayland: fix build with -no-opengl - round 2
This amends 419da488083c3ec81fc876ec4db9db708681d195 and
7c0a96785fee4fea8ef1452166b1dde88957445c .
It also aligns with the behavior of 6.9, which builds qt wayland
client plugin with -no-opengl.
Pick-to: 6.11 6.10
Fixes: QTBUG-145378
Fixes: QTBUG-140172
Change-Id: I77be85e3f38862d7709af065068b816e88a16b88
Reviewed-by: David Redondo <qt@david-redondo.de>
diff --git a/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration_p.h b/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration_p.h
index f8de871dfc0..1a6e917b214 100644
--- a/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration_p.h
+++ b/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration_p.h
@@ -52,9 +52,9 @@ public:
virtual bool supportsWindowDecoration() const { return false; }
virtual QWaylandWindow *createEglWindow(QWindow *window) = 0;
- virtual QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const = 0;
virtual bool canCreatePlatformOffscreenSurface() const { return false; }
#if QT_CONFIG(opengl)
+ virtual QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const = 0;
virtual QOpenGLContext *createOpenGLContext(EGLContext context, EGLDisplay contextDisplay, QOpenGLContext *shareContext) const = 0;
virtual QPlatformOffscreenSurface *createPlatformOffscreenSurface(QOffscreenSurface *surface) const { Q_UNUSED(surface); return nullptr; }
#endif
@@ -65,7 +65,9 @@ public:
EglContext
};
virtual void *nativeResource(NativeResource /*resource*/) { return nullptr; }
+#if QT_CONFIG(opengl)
virtual void *nativeResourceForContext(NativeResource /*resource*/, QPlatformOpenGLContext */*context*/) { return nullptr; }
+#endif
};
}
--
2.53.0