Make 'unmark' aware of matched windows.

This patch allows using 'unmark' on matched windows. The old behavior
of applying it to all windows if no criteria were specified is kept.

relates to 
This commit is contained in:
Ingo Bürk
2015-10-20 08:14:42 +02:00
parent 7a77c5f0bb
commit 9537ada5ad
4 changed files with 58 additions and 36 deletions

@ -1040,7 +1040,14 @@ void cmd_mark(I3_CMD, const char *mark, const char *mode, const char *toggle) {
*
*/
void cmd_unmark(I3_CMD, const char *mark) {
con_unmark(mark);
if (match_is_empty(current_match)) {
con_unmark(NULL, mark);
} else {
owindow *current;
TAILQ_FOREACH(current, &owindows, owindows) {
con_unmark(current->con, mark);
}
}
cmd_output->needs_tree_render = true;
// XXX: default reply for now, make this a better reply