Skip to content

[Backend/GLFW] Remove wayland files#5584

Closed
CrackedPixel wants to merge 2 commits into
raysan5:masterfrom
CrackedPixel:remove-wayland-files
Closed

[Backend/GLFW] Remove wayland files#5584
CrackedPixel wants to merge 2 commits into
raysan5:masterfrom
CrackedPixel:remove-wayland-files

Conversation

@CrackedPixel
Copy link
Copy Markdown
Contributor

@CrackedPixel CrackedPixel commented Feb 23, 2026

This requires that the user has glfw package installed on their system. I think that is reasonable for linux users using glfw

NOTE: x11 builds (default) are unaffected

cd src
make GLFW_LINUX_ENABLE_WAYLAND=TRUE

cd examples
make GLFW_LINUX_ENABLE_WAYLAND=TRUE

it will compile successfully, and you can detect x11/wayland in code if needed:

    #include <GLFW/glfw3.h>

    // after InitWindow()
    int platform = glfwGetPlatform();
    if (platform == GLFW_PLATFORM_WAYLAND) {
        printf("App using native Wayland backend\n");
    } else if (platform == GLFW_PLATFORM_X11) {
        printf("App using X11/XWayland backend\n");
    } else {
        printf("Unknown platform: %d\n", platform);
    }

@raysan5
Copy link
Copy Markdown
Owner

raysan5 commented Feb 23, 2026

It has been discussed on Discord, we can't assume glfw will be available on target platform, better keepraylib as much self-contained and portable as possible.

@CrackedPixel CrackedPixel deleted the remove-wayland-files branch March 11, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants