shiftview + scrachpads compatibility
This commit is contained in:
@ -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 {
|
||||
|
||||
do {
|
||||
if (arg->i > 0) // left 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));
|
||||
}
|
||||
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));
|
||||
|
||||
view(&shifted);
|
||||
}
|
||||
|
Reference in New Issue
Block a user