From 0c5afb58f5c77795aac1b600afd8bccff77b52ab Mon Sep 17 00:00:00 2001 From: Baptiste Rajaut Date: Wed, 11 Mar 2026 15:39:06 +0100 Subject: [PATCH] fix: add missing X11 link dep and use correct Qt6 GLX nativeContext() API on Linux --- CMakeLists.txt | 2 ++ app/render/opengl/platformglcontext.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b03dcab345..aca78f5f8f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -325,6 +325,8 @@ elseif (APPLE) list(APPEND OLIVE_LIBRARIES "-framework IOKit") elseif(UNIX) list(APPEND OLIVE_LIBRARIES Qt6::DBus) + find_package(X11 REQUIRED) + list(APPEND OLIVE_LIBRARIES X11::X11) endif() # Generate Git hash diff --git a/app/render/opengl/platformglcontext.cpp b/app/render/opengl/platformglcontext.cpp index e6b8fcc47a..a98bffb773 100644 --- a/app/render/opengl/platformglcontext.cpp +++ b/app/render/opengl/platformglcontext.cpp @@ -95,7 +95,7 @@ bool PlatformGLContext::Create(QOpenGLContext *share_with, const QSurfaceFormat // Create context GLXContext share_ctx = None; if (share_with) { - share_ctx = reinterpret_cast(share_with->nativeInterface()->context()); + share_ctx = share_with->nativeInterface()->nativeContext(); } // Try to create context with version