mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-05 23:51:29 +02:00
DRYer
This commit is contained in:
10
glfw/wl_init.c
vendored
10
glfw/wl_init.c
vendored
@@ -752,10 +752,12 @@ get_compositor_missing_capabilities(void) {
|
||||
C(idle_inhibit, idle_inhibit_manager); C(icon, xdg_toplevel_icon_manager_v1); C(bell, xdg_system_bell_v1);
|
||||
C(window-tag, xdg_toplevel_tag_manager_v1); C(keyboard_shortcuts_inhibit, keyboard_shortcuts_inhibit_manager);
|
||||
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.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");
|
||||
#define P(x) p += snprintf(p, sizeof(buf) - (p - buf), "%s ", x);
|
||||
if (_glfw.wl.xdg_wm_base_version < 6) P("window-state-suspended");
|
||||
if (_glfw.wl.xdg_wm_base_version < 5) P("window-capabilities");
|
||||
if (!_glfw.wl.color_manager.supported_transfer_functions.gamma22) P("gamma22");
|
||||
if (!_glfw.wl.color_manager.supported_transfer_functions.ext_linear) P("ext_linear");
|
||||
#undef P
|
||||
#undef C
|
||||
while (p > buf && (p - 1)[0] == ' ') { p--; *p = 0; }
|
||||
return buf;
|
||||
|
||||
Reference in New Issue
Block a user