Skip to content

wayfix crashes on x11 #73

Closed
Closed

Description

@PumpkinXD

logs:https://mclo.gs/n87xqJ7

I belive

return GLFW.glfwPlatformSupported(GLFW.GLFW_PLATFORM_WAYLAND);
is related
According to glfw's docs, glfwPlatformSupported(int platform) function returns whether the library was compiled with support for the specified platform.
(When GLFW is bundled with both X11 and Wayland support, glfwPlatformSupported(GLFW_PLATFORM_WAYLAND) still returns true on systems that only have X11. )

Activity

  1. PumpkinXD commented on Nov 22, 2025

    @PumpkinXD
    ContributorAuthor

    maybe we can also check System.getenv("XDG_SESSION_TYPE").lowercase()'s value to get around this(would be good for putting the mod into a modpack)

    like

    - return GLFW.glfwPlatformSupported(GLFW.GLFW_PLATFORM_WAYLAND); 
    + return (GLFW.glfwPlatformSupported(GLFW.GLFW_PLATFORM_WAYLAND) &&
    + Objects.requireNonNullElse(System.getenv("XDG_SESSION_TYPE"),"").toLowerCase().startsWith("wayland")); 
  2. added a commit that references this issue on Dec 29, 2025
    2f90216
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions