Report ancient xdg-shell versions

This commit is contained in:
Kovid Goyal 2025-02-12 11:31:28 +05:30
parent d27e4f84b7
commit 2cf83070a0
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 5 additions and 2 deletions

5
glfw/wl_init.c vendored
View file

@ -703,7 +703,7 @@ _glfwWaylandCompositorName(void) {
static const char*
get_compositor_missing_capabilities(void) {
#define C(title, x) if (!_glfw.wl.x) p += snprintf(buf, sizeof(buf) - (p - buf), "%s", #title);
#define C(title, x) if (!_glfw.wl.x) p += snprintf(buf, sizeof(buf) - (p - buf), "%s ", #title);
static char buf[256];
char *p = buf;
*p = 0;
@ -712,7 +712,10 @@ get_compositor_missing_capabilities(void) {
C(cursor_shape, wp_cursor_shape_manager_v1); C(layer_shell, zwlr_layer_shell_v1);
C(single_pixel_buffer, wp_single_pixel_buffer_manager_v1); C(preferred_scale, has_preferred_buffer_scale);
C(idle_inhibit, idle_inhibit_manager);
if (_glfw.wl.xdg_wm_base_version < 6) p += snprintf(buf, sizeof(buf) - (p - buf), "%s ", "window-state-suspended");
if (_glfw.wl.xdg_wm_base_version < 5) p += snprintf(buf, sizeof(buf) - (p - buf), "%s ", "window-capabilities");
#undef C
while (p > buf && (p - 1)[0] == ' ') { p--; *p = 0; }
return buf;
}

View file

@ -3307,7 +3307,7 @@
Only send a notification when the window both is unfocused and not visible
to the user, for example, because it is in an inactive tab or its OS window
is not currently visible (note that OS Window visibility is not implemented
by some Wayland compositors such as sway).
by some Wayland compositors such as sway and also not implemented in X11).
:code:`always`
Always send a notification, regardless of window state.