From 9f0eb9a0da8e9d6f1729f823555fdac2135214f0 Mon Sep 17 00:00:00 2001 From: Joshua Borkowski-Clark <1917489+JoBoCl@users.noreply.github.com> Date: Sat, 30 Aug 2025 00:01:55 +0200 Subject: [PATCH] Add call to glfwInitHint to enable rack to launch on Wayland https://github.com/NixOS/nixpkgs/issues/393113#issuecomment-3184122450 has examples of users unable to launch Rack without workarounds I have tried adding this line and Rack builds and runs successfully on a wayland-based desktop. --- src/window/Window.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/window/Window.cpp b/src/window/Window.cpp index 59497645..0a5029ef 100644 --- a/src/window/Window.cpp +++ b/src/window/Window.cpp @@ -819,6 +819,10 @@ void init() { glfwInitHint(GLFW_COCOA_MENUBAR, GLFW_FALSE); #endif +#if defined ARCH_LIN + glfwInitHint(GLFW_PLATFORM, GLFW_PLATFORM_X11); +#endif + glfwSetErrorCallback(errorCallback); err = glfwInit(); if (err != GLFW_TRUE) {