diff options
| author | bakkeby <[email protected]> | 2020-06-05 09:43:27 +0200 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2020-06-05 09:43:27 +0200 |
| commit | bad53d2cc4b0aaff997c2b6d646eef2c173afaf0 (patch) | |
| tree | 32814c5599c58b61cc5fdeb3f863dfecdf8f7110 /patch | |
| parent | fbb1537da651b21da139d2023bdff27829c1925d (diff) | |
| download | dwm-flexipatch-bad53d2cc4b0aaff997c2b6d646eef2c173afaf0.tar.gz dwm-flexipatch-bad53d2cc4b0aaff997c2b6d646eef2c173afaf0.zip | |
Upgrading Gaspar Vardanyan's scratchpad patch to the 20200510 version.
https://github.com/GasparVardanyan/dwm-scratchpad/blob/master/dwm-scratchpad-20200510-f09418b.diff
Diffstat (limited to 'patch')
| -rw-r--r-- | patch/scratchpad_alt_1.c | 10 | ||||
| -rw-r--r-- | patch/scratchpad_alt_1.h | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/patch/scratchpad_alt_1.c b/patch/scratchpad_alt_1.c index 9d89ac9..8feb49b 100644 --- a/patch/scratchpad_alt_1.c +++ b/patch/scratchpad_alt_1.c @@ -4,7 +4,7 @@ static void scratchpad_hide () { if (selmon -> sel) { - selmon -> sel -> tags = scratchpad_mask; + selmon -> sel -> tags = SCRATCHPAD_MASK; focus(NULL); arrange(selmon); } @@ -36,9 +36,9 @@ static void scratchpad_show () scratchpad_show_first (); else { - if (scratchpad_last_showed -> tags != scratchpad_mask) + if (scratchpad_last_showed -> tags != SCRATCHPAD_MASK) { - scratchpad_last_showed -> tags = scratchpad_mask; + scratchpad_last_showed -> tags = SCRATCHPAD_MASK; focus(NULL); arrange(selmon); } @@ -58,7 +58,7 @@ static void scratchpad_show () } else { - if (c -> tags == scratchpad_mask) + if (c -> tags == SCRATCHPAD_MASK) { found_next = 1; scratchpad_show_client (c); @@ -83,7 +83,7 @@ static void scratchpad_show_first (void) { for (Client * c = selmon -> clients; c != NULL; c = c -> next) { - if (c -> tags == scratchpad_mask) + if (c -> tags == SCRATCHPAD_MASK) { scratchpad_show_client (c); break; diff --git a/patch/scratchpad_alt_1.h b/patch/scratchpad_alt_1.h index 4bbbf9b..6248c88 100644 --- a/patch/scratchpad_alt_1.h +++ b/patch/scratchpad_alt_1.h @@ -1,3 +1,5 @@ +# define SCRATCHPAD_MASK (1u << sizeof tags / sizeof * tags) + static void scratchpad_hide (); static _Bool scratchpad_last_showed_is_killed (void); static void scratchpad_remove (); |
