diff options
author | Joe <rbo@gmx.us> | 2024-12-30 11:57:19 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-12-30 11:57:19 +0100 |
commit | 5409b7a330f122b880fd830c127932db10e1bc6b (patch) | |
tree | 900690d8d54bfa53918322afa3ccc7b31f55bf26 | |
parent | its a start (diff) | |
download | dwm-5409b7a330f122b880fd830c127932db10e1bc6b.tar.gz dwm-5409b7a330f122b880fd830c127932db10e1bc6b.tar.bz2 dwm-5409b7a330f122b880fd830c127932db10e1bc6b.tar.xz dwm-5409b7a330f122b880fd830c127932db10e1bc6b.tar.zst dwm-5409b7a330f122b880fd830c127932db10e1bc6b.zip |
ok nice
-rw-r--r-- | dwm.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -2596,12 +2596,12 @@ void shiftboth(const Arg *arg) { Arg shifted; - shifted.ui = selmon->tagset[selmon->seltags]; + shifted.ui = selmon->tagset[selmon->seltags] & ~SPTAGMASK; if (arg->i > 0) /* left circular shift */ - shifted.ui = ((shifted.ui << arg->i) | (shifted.ui >> (LENGTH(tags) - arg->i))); + shifted.ui = ((shifted.ui << arg->i) | (shifted.ui >> (LENGTH(tags) - arg->i))) & ~SPTAGMASK; else /* right circular shift */ - shifted.ui = ((shifted.ui >> (- arg->i) | shifted.ui << (LENGTH(tags) + arg->i))); + shifted.ui = ((shifted.ui >> (- arg->i) | shifted.ui << (LENGTH(tags) + arg->i))) & ~SPTAGMASK; tag(&shifted); view(&shifted); } @@ -2610,12 +2610,15 @@ void shiftview(const Arg *arg) { Arg shifted; - shifted.ui = selmon->tagset[selmon->seltags]; + shifted.ui = selmon->tagset[selmon->seltags] & ~SPTAGMASK; - if (arg->i > 0) /* left circular shift */ + if (arg->i > 0) {/* left circular shift */ shifted.ui = (shifted.ui << arg->i) | (shifted.ui >> (LENGTH(tags) - arg->i)); - else /* right circular shift */ + shifted.ui &= ~SPTAGMASK; + } else { /* right circular shift */ shifted.ui = (shifted.ui >> (- arg->i) | shifted.ui << (LENGTH(tags) + arg->i)); + shifted.ui &= ~SPTAGMASK; + } view(&shifted); } |