#include <string.h>
#include <stdbool.h>
#include <stdarg.h>
+#include <inttypes.h>
#include <unistd.h>
#include "bspwm.h"
#include "desktop.h"
set_private(trg.monitor, trg.desktop, trg.node, (a == ALTER_SET ? b : !trg.node->private));
} else if (streq("locked", key)) {
set_locked(trg.monitor, trg.desktop, trg.node, (a == ALTER_SET ? b : !trg.node->locked));
+ } else if (streq("marked", key)) {
+ set_marked(trg.monitor, trg.desktop, trg.node, (a == ALTER_SET ? b : !trg.node->marked));
} else {
fail(rsp, "node %s: Invalid key: '%s'.\n", *(args - 1), key);
break;
break;
}
}
- focus_node(dst.monitor, dst.desktop, dst.desktop->focus);
+ focus_node(dst.monitor, dst.desktop, NULL);
} else if (streq("-a", *args) || streq("--activate", *args)) {
coordinates_t dst = trg;
if (num > 1 && *(args + 1)[0] != OPT_CHR) {
break;
}
}
- if (!activate_desktop(dst.monitor, dst.desktop)) {
+ if (activate_desktop(dst.monitor, dst.desktop)) {
+ activate_node(dst.monitor, dst.desktop, NULL);
+ } else {
fail(rsp, "");
break;
}
return;
}
}
- focus_node(dst.monitor, dst.monitor->desk, dst.monitor->desk->focus);
+ focus_node(dst.monitor, NULL, NULL);
} else if (streq("-s", *args) || streq("--swap", *args)) {
num--, args++;
if (num < 1) {
fail(rsp, "config: %s: Invalid value: '%s'.\n", name, value);
return;
}
+ } else if (streq("mapping_events_count", name)) {
+ if (sscanf(value, "%" SCNi8, &mapping_events_count) != 1) {
+ fail(rsp, "config: %s: Invalid value: '%s'.\n", name, value);
+ return;
+ }
} else if (streq("directional_focus_tightness", name)) {
tightness_t p;
if (parse_tightness(value, &p)) {
fprintf(rsp, "%s", status_prefix);
} else if (streq("initial_polarity", name)) {
fprintf(rsp, "%s", CHILD_POL_STR(initial_polarity));
+ } else if (streq("mapping_events_count", name)) {
+ fprintf(rsp, "%" PRIi8, mapping_events_count);
} else if (streq("directional_focus_tightness", name)) {
fprintf(rsp, "%s", TIGHTNESS_STR(directional_focus_tightness));
} else if (streq("pointer_modifier", name)) {