mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
shiftview: fixed bug when scratchpad is enabled
This commit is contained in:
parent
3b5f3f66ce
commit
45f763b837
@ -2,14 +2,17 @@ void
|
|||||||
shiftview(const Arg *arg)
|
shiftview(const Arg *arg)
|
||||||
{
|
{
|
||||||
Arg shifted;
|
Arg shifted;
|
||||||
|
#if SCRATCHPADS_PATCH
|
||||||
|
unsigned int seltagset = selmon->tagset[selmon->seltags] & ~SPTAGMASK;
|
||||||
|
#else
|
||||||
|
unsigned int seltagset = selmon->tagset[selmon->seltags];
|
||||||
|
#endif // SCRATCHPADS_PATCH
|
||||||
if (arg->i > 0) // left circular shift
|
if (arg->i > 0) // left circular shift
|
||||||
shifted.ui = (selmon->tagset[selmon->seltags] << arg->i)
|
shifted.ui = (seltagset << arg->i)
|
||||||
| (selmon->tagset[selmon->seltags] >> (NUMTAGS - arg->i));
|
| (seltagset >> (NUMTAGS - arg->i));
|
||||||
|
|
||||||
else // right circular shift
|
else // right circular shift
|
||||||
shifted.ui = selmon->tagset[selmon->seltags] >> (- arg->i)
|
shifted.ui = seltagset >> -arg->i
|
||||||
| selmon->tagset[selmon->seltags] << (NUMTAGS + arg->i);
|
| seltagset << (NUMTAGS + arg->i);
|
||||||
|
|
||||||
view(&shifted);
|
view(&shifted);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user