启动时扫描已有窗口并管理
This commit is contained in:
16
src/main.c
16
src/main.c
@@ -146,8 +146,11 @@ static void print_window_list(window_list_t *window_list) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < window_list->count; i++) {
|
||||
logger("window[%u]: 0x%x\n", i, window_list->list[i]);
|
||||
for (uint32_t i = 0; i < window_list->normal_count; i++) {
|
||||
logger("normal window[%u]: 0x%x\n", i, window_list->normal_list[i]);
|
||||
}
|
||||
for (uint32_t i = 0; i < window_list->transient_count; i++) {
|
||||
logger("transient window[%u]: 0x%x\n", i, window_list->transient_list[i]);
|
||||
}
|
||||
}
|
||||
static char *bool2string(bool b) { return b ? "true" : "false"; }
|
||||
@@ -877,6 +880,15 @@ int main(int argc, char *argv[]) {
|
||||
print_wallpaper_config(wallpaper_config);
|
||||
print_window_list(window_list);
|
||||
|
||||
if (window_list) {
|
||||
for (uint32_t i = 0; i < window_list->normal_count; i++) {
|
||||
manage_window(window_list->normal_list[i]);
|
||||
}
|
||||
for (uint32_t i = 0; i < window_list->transient_count; i++) {
|
||||
manage_window(window_list->transient_list[i]);
|
||||
}
|
||||
}
|
||||
|
||||
free_window_list(window_list);
|
||||
|
||||
grab_keybindings(keys, LENGTH(keys));
|
||||
|
||||
Reference in New Issue
Block a user