初始化每个屏幕的 tag

This commit is contained in:
2025-11-13 23:46:44 +08:00
parent db284bf6b7
commit 94760fc2f8
4 changed files with 36 additions and 0 deletions

View File

@@ -18,6 +18,8 @@
#include "backtrace.h"
#include "buffer.h"
#include "default_config.h"
#include "monitor.h"
#include "types.h"
#include "utils.h"
@@ -255,6 +257,9 @@ static void debug_show_monitor_list(void) {
printf("x: %4d, y: %4d, width: %4u, height: %4u -> monitor[%s]\n",
m->geometry.x, m->geometry.y, m->geometry.width, m->geometry.height,
m->name);
for (const tag_t *tag = m->tag_list; tag; tag = tag->next) {
printf("tag[\"%s\"]: 0b%09b\n", tag->name, tag->mask);
}
}
}
@@ -267,6 +272,9 @@ int main(int argc, char *argv[]) {
wm_check_xcb_extensions();
wm_detect_monitor();
for (monitor_t *m = wm.monitor_list; m; m = m->next) {
monitor_initialize_tag(m, (const char **)tags);
}
debug_show_monitor_list();