backend: X11 后端添加获取窗口 metadata 信息方式
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user