diff --git a/pkgs/by-name/gl/glfw3/window-position.patch b/pkgs/by-name/gl/glfw3/window-position.patch index 7f57b856af93..61828365f12b 100644 --- a/pkgs/by-name/gl/glfw3/window-position.patch +++ b/pkgs/by-name/gl/glfw3/window-position.patch @@ -1,30 +1,37 @@ -From 807d9b0efe86e85a54cd2daf7da2ba1591b39f14 Mon Sep 17 00:00:00 2001 -From: uku -Date: Sat, 27 Dec 2025 19:25:42 +0100 -Subject: [PATCH] fix: dismiss warning about window position being unavailable +Dismiss warnings about window position being unavailable on Wayland. In addition to the other glfw patches, this one is required on certain compositors such as niri and waywall to be able to launch Minecraft at all. ---- - src/wl_window.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/src/wl_window.c b/src/wl_window.c -index ad39b2e0..38f86a17 100644 +This patch expands the suppression to setting positions. This +prevents Minecraft Forge environments from crashing on Wayland when +strict error callbacks are used. + +Original get-position fix by: uku +Expanded to include set-position, inspired by Prior5151's fix on AUR. +https://aur.archlinux.org/packages/glfw-wayland-minecraft-cursorfix#comment-1013099 + --- a/src/wl_window.c +++ b/src/wl_window.c -@@ -2293,8 +2293,8 @@ void _glfwGetWindowPosWayland(_GLFWwindow* window, int* xpos, int* ypos) +@@ -2236,16 +2236,16 @@ void _glfwGetWindowPosWayland(_GLFWwindow* window, int* xpos, int* ypos) // A Wayland client is not aware of its position, so just warn and leave it // as (0, 0) - _glfwInputError(GLFW_FEATURE_UNAVAILABLE, - "Wayland: The platform does not provide the window position"); + fprintf(stderr, -+ "[GLFW] Wayland: The platform does not provide the window position\n"); ++ "[GLFW] Wayland: The platform does not provide the window position\n"); } void _glfwSetWindowPosWayland(_GLFWwindow* window, int xpos, int ypos) --- -2.51.2 - + { + // A Wayland client can not set its position, so just warn + +- _glfwInputError(GLFW_FEATURE_UNAVAILABLE, +- "Wayland: The platform does not support setting the window position"); ++ fprintf(stderr, ++ "[GLFW] Wayland: The platform does not support setting the window position\n"); + } + + void _glfwGetWindowSizeWayland(_GLFWwindow* window, int* width, int* height)