mirror of
https://github.com/vale981/bspwm
synced 2025-03-05 09:51:38 -05:00
parent
e5cb04df18
commit
ae76469130
1 changed files with 15 additions and 0 deletions
|
@ -114,6 +114,7 @@ bool restore_tree(const char *file_path)
|
|||
|
||||
jsmntok_t *t = tokens + 1;
|
||||
uint32_t focused_monitor_id = 0, primary_monitor_id = 0;
|
||||
jsmntok_t *focus_history_token = NULL, *stacking_list_token = NULL;
|
||||
|
||||
for (int i = 0; i < num; i++) {
|
||||
if (keyeq("focusedMonitorId", t, json)) {
|
||||
|
@ -139,10 +140,16 @@ bool restore_tree(const char *file_path)
|
|||
continue;
|
||||
} else if (keyeq("focusHistory", t, json)) {
|
||||
t++;
|
||||
if (mon == NULL) {
|
||||
focus_history_token = t;
|
||||
}
|
||||
restore_history(&t, json);
|
||||
continue;
|
||||
} else if (keyeq("stackingList", t, json)) {
|
||||
t++;
|
||||
if (mon == NULL) {
|
||||
stacking_list_token = t;
|
||||
}
|
||||
restore_stack(&t, json);
|
||||
continue;
|
||||
}
|
||||
|
@ -163,6 +170,14 @@ bool restore_tree(const char *file_path)
|
|||
}
|
||||
}
|
||||
|
||||
if (focus_history_token != NULL) {
|
||||
restore_history(&focus_history_token, json);
|
||||
}
|
||||
|
||||
if (stacking_list_token != NULL) {
|
||||
restore_stack(&stacking_list_token, json);
|
||||
}
|
||||
|
||||
for (monitor_t *m = mon_head; m != NULL; m = m->next) {
|
||||
for (desktop_t *d = m->desk_head; d != NULL; d = d->next) {
|
||||
refresh_presel_feedbacks(m, d, d->root);
|
||||
|
|
Loading…
Add table
Reference in a new issue