From 7bfcd388f6d2a45d5753a909a5a8c2cf91529194 Mon Sep 17 00:00:00 2001 From: bakkeby Date: Thu, 29 Oct 2020 14:23:58 +0100 Subject: [PATCH] shiftviewclients: fix for another scratchpads edge case ref. https://github.com/bakkeby/patches/issues/12 --- patch/shiftviewclients.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/patch/shiftviewclients.c b/patch/shiftviewclients.c index fb0da48..04378ef 100644 --- a/patch/shiftviewclients.c +++ b/patch/shiftviewclients.c @@ -25,11 +25,17 @@ shiftviewclients(const Arg *arg) 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 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);