From 8b9d80220676c20b02e1cf170b2cf85c6312b323 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 31 Jul 2025 19:18:09 +0530 Subject: [PATCH] Specify the color space on Wayland surfaces Uses sRGB with the sRGB transfer function. Seems to give identical results as not specifying a color space. But sadly does not get the compositor to blend in linear space, we need another wayland protocol extension for that I suppose. Sigh. --- glfw/wl_window.c | 1 + 1 file changed, 1 insertion(+) diff --git a/glfw/wl_window.c b/glfw/wl_window.c index 554326889..247397d66 100644 --- a/glfw/wl_window.c +++ b/glfw/wl_window.c @@ -589,6 +589,7 @@ create_surface(_GLFWwindow* window, const _GLFWwndconfig* wndconfig) { ensure_color_manager_ready(); if (_glfw.wl.color_manager.image_description) { window->wl.color_management = wp_color_manager_v1_get_surface(_glfw.wl.wp_color_manager_v1, window->wl.surface); + wp_color_management_surface_v1_set_image_description(window->wl.color_management, _glfw.wl.color_manager.image_description, WP_COLOR_MANAGER_V1_RENDER_INTENT_PERCEPTUAL); } }