File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 28
28
#define GLFW_EXPOSE_NATIVE_X11
29
29
#define GLFW_EXPOSE_NATIVE_WAYLAND
30
30
#define GLFW_EXPOSE_NATIVE_GLX
31
+ #define IDYNTREE_USES_WAYLAND
31
32
#endif
32
33
33
34
#include < GLFW/glfw3.h>
@@ -506,10 +507,13 @@ bool Visualizer::init(const VisualizerOptions &visualizerOptions)
506
507
pimpl->m_windowId = glfwGetCocoaWindow (pimpl->m_window );
507
508
irrDevParams.WindowId = (void *)(pimpl->m_windowId );
508
509
#elif defined(__linux__)
509
- void * nativeWindow = nullptr ;
510
+ #ifdef IDYNTREE_USES_WAYLAND
511
+ // Try Wayland first
512
+ struct wl_surface * waylandWindow = glfwGetWaylandWindow (pimpl->m_window );
513
+ #else
514
+ void * waylandWindow = nullptr ;
515
+ #endif
510
516
511
- // Try Wayland first
512
- struct wl_surface * waylandWindow = glfwGetWaylandWindow (pimpl->m_window );
513
517
if (waylandWindow)
514
518
{
515
519
nativeWindow = static_cast <void *>(waylandWindow);
You can’t perform that action at this time.
0 commit comments