main: include toplevel-icon support in --version output

This commit is contained in:
Daniel Eklöf 2024-09-13 08:45:54 +02:00
parent f5caa2d265
commit c6208a98c8
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 24 additions and 8 deletions

View file

@ -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
}

3
main.c
View file

@ -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;
}

View file

@ -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) {