summaryrefslogtreecommitdiffhomepage
path: root/patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch')
-rw-r--r--patch/scratchpad_alt_1.c10
-rw-r--r--patch/scratchpad_alt_1.h2
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 ();