Skip to content

Commit 21c0bb7

Browse files
authored
Update ofAppGLFWWindow.cpp
Wayland Fix missing from PR #8508
1 parent 619c7d5 commit 21c0bb7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

libs/openFrameworks/app/ofAppGLFWWindow.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ using std::vector;
4040
namespace of{
4141
namespace priv{
4242
bool InitGLFW(){
43+
#if defined(TARGET_LINUX) && defined(GLFW_PLATFORM_X11)
44+
// GLFW 3.4+ auto-detects Wayland when $WAYLAND_DISPLAY is set,
45+
// Force the X11 backend so XWayland bridges us into the Wayland
46+
// session transparently — no sudo required.
47+
glfwInitHint(GLFW_PLATFORM, GLFW_PLATFORM_X11);
48+
#endif
4349
return glfwInit();
4450
}
4551
}

0 commit comments

Comments
 (0)