mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 12:05:45 +00:00
shiftview + scrachpads compatibility
This commit is contained in:
parent
2ecc15a2ef
commit
c553f93b52
@ -8,12 +8,12 @@ shiftview(const Arg *arg)
|
||||
unsigned int seltagset = selmon->tagset[selmon->seltags];
|
||||
#endif // SCRATCHPADS_PATCH
|
||||
if (arg->i > 0) // left circular shift
|
||||
shifted.ui = (seltagset << arg->i)
|
||||
| (seltagset >> (NUMTAGS - arg->i));
|
||||
shifted.ui = (seltagset << arg->i) | (seltagset >> (NUMTAGS - arg->i));
|
||||
else // right circular shift
|
||||
shifted.ui = seltagset >> -arg->i
|
||||
| seltagset << (NUMTAGS + arg->i);
|
||||
shifted.ui = (seltagset >> -arg->i) | (seltagset << (NUMTAGS + arg->i));
|
||||
#if SCRATCHPADS_PATCH
|
||||
shifted.ui &= ~SPTAGMASK;
|
||||
#endif // SCRATCHPADS_PATCH
|
||||
|
||||
view(&shifted);
|
||||
}
|
||||
|
||||
|
@ -1,2 +1 @@
|
||||
static void shiftview(const Arg *arg);
|
||||
|
||||
|
@ -29,23 +29,18 @@ shiftviewclients(const Arg *arg)
|
||||
#else
|
||||
shifted.ui = selmon->tagset[selmon->seltags];
|
||||
#endif // SCRATCHPADS_PATCH
|
||||
if (arg->i > 0) { // left circular shift
|
||||
|
||||
do {
|
||||
if (arg->i > 0) // left circular shift
|
||||
shifted.ui = (shifted.ui << arg->i)
|
||||
| (shifted.ui >> (NUMTAGS - arg->i));
|
||||
else // right circular shift
|
||||
shifted.ui = (shifted.ui >> -arg->i)
|
||||
| (shifted.ui << (NUMTAGS + arg->i));
|
||||
#if SCRATCHPADS_PATCH
|
||||
shifted.ui &= ~SPTAGMASK;
|
||||
#endif // SCRATCHPADS_PATCH
|
||||
} while (tagmask && !(shifted.ui & tagmask));
|
||||
} else { // right circular shift
|
||||
do {
|
||||
shifted.ui = (shifted.ui >> (- arg->i)
|
||||
| shifted.ui << (NUMTAGS + arg->i));
|
||||
#if SCRATCHPADS_PATCH
|
||||
shifted.ui &= ~SPTAGMASK;
|
||||
#endif // SCRATCHPADS_PATCH
|
||||
} while (tagmask && !(shifted.ui & tagmask));
|
||||
}
|
||||
|
||||
view(&shifted);
|
||||
}
|
||||
|
@ -1,2 +1 @@
|
||||
static void shiftviewclients(const Arg *arg);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user