mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 08:26:56 +00:00
Also track support for extlinear transfer function
This commit is contained in:
parent
d0a862bedb
commit
8762576a5b
2 changed files with 8 additions and 4 deletions
8
glfw/wl_init.c
vendored
8
glfw/wl_init.c
vendored
|
|
@ -466,8 +466,9 @@ static void
|
|||
on_supported_color_transfer_function(void *data UNUSED, struct wp_color_manager_v1 *wp_color_manager_v1 UNUSED, uint32_t x) {
|
||||
switch(x) {
|
||||
case WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_GAMMA22:
|
||||
_glfw.wl.color_manager.supports_gamma22_transfer_function = true;
|
||||
break;
|
||||
_glfw.wl.color_manager.supported_transfer_functions.gamma22 = true; break;
|
||||
case WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_EXT_LINEAR:
|
||||
_glfw.wl.color_manager.supported_transfer_functions.ext_linear = true; break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -753,7 +754,8 @@ get_compositor_missing_capabilities(void) {
|
|||
C(color-manager, wp_color_manager_v1);
|
||||
if (_glfw.wl.xdg_wm_base_version < 6) p += snprintf(p, sizeof(buf) - (p - buf), "%s ", "window-state-suspended");
|
||||
if (_glfw.wl.xdg_wm_base_version < 5) p += snprintf(p, sizeof(buf) - (p - buf), "%s ", "window-capabilities");
|
||||
if (!_glfw.wl.color_manager.supports_gamma22_transfer_function) p += snprintf(p, sizeof(buf) - (p - buf), "%s ", "gamma22");
|
||||
if (!_glfw.wl.color_manager.supported_transfer_functions.gamma22) p += snprintf(p, sizeof(buf) - (p - buf), "%s ", "gamma22");
|
||||
if (!_glfw.wl.color_manager.supported_transfer_functions.ext_linear) p += snprintf(p, sizeof(buf) - (p - buf), "%s ", "ext_linear");
|
||||
#undef C
|
||||
while (p > buf && (p - 1)[0] == ' ') { p--; *p = 0; }
|
||||
return buf;
|
||||
|
|
|
|||
4
glfw/wl_platform.h
vendored
4
glfw/wl_platform.h
vendored
|
|
@ -396,7 +396,9 @@ typedef struct _GLFWlibraryWayland
|
|||
} egl;
|
||||
|
||||
struct {
|
||||
bool supports_gamma22_transfer_function;
|
||||
struct {
|
||||
bool gamma22, ext_linear;
|
||||
} supported_transfer_functions;
|
||||
bool capabilities_reported;
|
||||
} color_manager;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue