mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 12:05:45 +00:00
scratchpads: when the scratchpad patch is added, the tagmask is altered, so to get a window onto all tags you have to do ~SPTAGSMASK instead of ~0 as otherwise it will interfere with the scratchpads, ref. #53
This commit is contained in:
parent
8726ae0aa9
commit
795fcc3b51
@ -920,6 +920,9 @@ static Key keys[] = {
|
||||
{ MODKEY, XK_minus, scratchpad_show, {0} },
|
||||
{ MODKEY|ShiftMask, XK_minus, scratchpad_hide, {0} },
|
||||
{ MODKEY, XK_equal, scratchpad_remove, {0} },
|
||||
#elif SCRATCHPADS_PATCH
|
||||
{ MODKEY, XK_0, view, {.ui = ~SPTAGMASK } },
|
||||
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~SPTAGMASK } },
|
||||
#else
|
||||
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
||||
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
|
||||
|
9
dwm.c
9
dwm.c
@ -3746,14 +3746,19 @@ toggleview(const Arg *arg)
|
||||
selmon->tagset[selmon->seltags] = newtagset;
|
||||
|
||||
#if PERTAG_PATCH
|
||||
if (newtagset == ~0) {
|
||||
#if SCRATCHPADS_PATCH
|
||||
if (newtagset == ~SPTAGMASK)
|
||||
#else
|
||||
if (newtagset == ~0)
|
||||
#endif // SCRATCHPADS_PATCH
|
||||
{
|
||||
selmon->pertag->prevtag = selmon->pertag->curtag;
|
||||
selmon->pertag->curtag = 0;
|
||||
}
|
||||
/* test if the user did not select the same tag */
|
||||
if (!(newtagset & 1 << (selmon->pertag->curtag - 1))) {
|
||||
selmon->pertag->prevtag = selmon->pertag->curtag;
|
||||
for (i=0; !(newtagset & 1 << i); i++) ;
|
||||
for (i = 0; !(newtagset & 1 << i); i++) ;
|
||||
selmon->pertag->curtag = i + 1;
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,11 @@ viewex(const Arg *arg)
|
||||
void
|
||||
viewallex(const Arg *arg)
|
||||
{
|
||||
#if SCRATCHPADS_PATCH
|
||||
view(&((Arg){.ui = ~SPTAGMASK}));
|
||||
#else
|
||||
view(&((Arg){.ui = ~0}));
|
||||
#endif // SCRATCHPADS_PATCH
|
||||
}
|
||||
|
||||
void
|
||||
@ -37,7 +41,11 @@ toggletagex(const Arg *arg)
|
||||
void
|
||||
tagallex(const Arg *arg)
|
||||
{
|
||||
#if SCRATCHPADS_PATCH
|
||||
tag(&((Arg){.ui = ~SPTAGMASK}));
|
||||
#else
|
||||
tag(&((Arg){.ui = ~0}));
|
||||
#endif // SCRATCHPADS_PATCH
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -32,7 +32,11 @@ pertagview(const Arg *arg)
|
||||
if (arg->ui & TAGMASK) {
|
||||
selmon->pertag->prevtag = selmon->pertag->curtag;
|
||||
selmon->tagset[selmon->seltags] = arg->ui & TAGMASK;
|
||||
#if SCRATCHPADS_PATCH
|
||||
if (arg->ui == ~SPTAGMASK)
|
||||
#else
|
||||
if (arg->ui == ~0)
|
||||
#endif // SCRATCHPADS_PATCH
|
||||
selmon->pertag->curtag = 0;
|
||||
else {
|
||||
for (i = 0; !(arg->ui & 1 << i); i++) ;
|
||||
|
Loading…
x
Reference in New Issue
Block a user