shiftview + scrachpads compatibility

pull/251/head
Bakkeby 2 years ago
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 {
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);
}

@ -1,2 +1 @@
static void shiftviewclients(const Arg *arg);

Loading…
Cancel
Save