diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2024-09-13 06:45:54 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2024-09-13 07:04:18 +0000 |
| commit | c6208a98c80f4b945608b4ce1bd6f35fab5b56d8 (patch) | |
| tree | 6fa24f0512e3dff1d1fa964f23502e1c9cb15b68 | |
| parent | pgo: add missing stub for render_refresh_icon() (diff) | |
main: include toplevel-icon support in --version output
| -rw-r--r-- | foot-features.h | 9 | ||||
| -rw-r--r-- | main.c | 3 | ||||
| -rw-r--r-- | wayland.c | 20 |
3 files changed, 24 insertions, 8 deletions
diff --git a/foot-features.h b/foot-features.h index ad447767..674c1056 100644 --- a/foot-features.h +++ b/foot-features.h @@ -37,3 +37,12 @@ static inline bool feature_graphemes(void) return false; #endif } + +static inline bool feature_xdg_toplevel_icon(void) +{ +#if defined(HAVE_XDG_TOPLEVEL_ICON) + return true; +#else + return false; +#endif +} @@ -51,11 +51,12 @@ version_and_features(void) { static char buf[256]; snprintf(buf, sizeof(buf), - "version: %s %cpgo %cime %cgraphemes %cassertions", + "version: %s %cpgo %cime %cgraphemes %ctoplevel-icon %cassertions", FOOT_VERSION, feature_pgo() ? '+' : '-', feature_ime() ? '+' : '-', feature_graphemes() ? '+' : '-', + feature_xdg_toplevel_icon() ? '+' : '-', feature_assertions() ? '+' : '-'); return buf; } @@ -1592,27 +1592,33 @@ wayl_init(struct fdm *fdm, struct key_binding_manager *key_binding_manager, goto out; } + if (presentation_timings && wayl->presentation == NULL) { + LOG_ERR("compositor does not implement the presentation time interface"); + goto out; + } + if (wayl->primary_selection_device_manager == NULL) - LOG_WARN("no primary selection available"); + LOG_WARN("compositor does not implement the primary selection interface"); if (wayl->xdg_activation == NULL) { LOG_WARN( - "no XDG activation support; " + "compositor does not implement XDG activation, " "bell.urgent will fall back to coloring the window margins red"); } if (wayl->fractional_scale_manager == NULL || wayl->viewporter == NULL) - LOG_WARN("fractional scaling not available"); + LOG_WARN("compositor does not implement fractional scaling"); if (wayl->cursor_shape_manager == NULL) { - LOG_WARN("no server-side cursors available, " + LOG_WARN("compositor does not implement server-side cursors, " "falling back to client-side cursors"); } - if (presentation_timings && wayl->presentation == NULL) { - LOG_ERR("presentation time interface not implemented by compositor"); - goto out; +#if defined(HAVE_XDG_TOPLEVEL_ICON) + if (wayl->toplevel_icon_manager == NULL) { + LOG_WARN("compositor does not implement the XDG toplevel icon protocol"); } +#endif #if defined(FOOT_IME_ENABLED) && FOOT_IME_ENABLED if (wayl->text_input_manager == NULL) { |
