GLFW not using GTK through libdecor

I’ve solved this, and it’s not an issue of GLFW.

  1. Install libdecor-0-plugin-1-gtk (I had to compile it from source)

  2. Run with the LIBDECOR_PLUGIN_DIR variable set, which I needed for some reason. (LIBDECOR_PLUGIN_DIR is where your libdecor plugins are installed, for example, mine was /usr/local/lib/x86_64-linux-gnu/libdecor/plugins-1 as I had manually compiled it).

Cheers, and thank you for the amazing library!

Edit: Another workaround is to enforce X11. Forcing X11 on Gnome makes the server use xWayland which has proper Server Side Decorations as opposed to Wayland.

// Forcing X11 on Gnome makes the server use xWayland which has proper Server Side Decorations as opposed to Wayland.
if (strcmp(getenv("XDG_CURRENT_DESKTOP"), "GNOME") == 0)
    glfwInitHint(GLFW_PLATFORM, GLFW_PLATFORM_X11);
else
    glfwInitHint(GLFW_PLATFORM, GLFW_ANY_PLATFORM);
1 Like