backend: X11 后端添加获取窗口 metadata 信息方式

This commit is contained in:
2026-04-07 03:16:51 +08:00
parent ab961d6d79
commit 9728fad871
8 changed files with 176 additions and 11 deletions

View File

@@ -24,6 +24,12 @@ static inline char *p_strdup(const char *text) {
return r;
}
static inline char *p_strndup(const char *text, size_t n) {
char *r = strndup(text, n);
if (!r) abort();
return r;
}
static inline char *p_strdup_nullable(const char *text) {
if (!text) return nullptr;
return p_strdup(text);