Why there are same statement in the if-else block? Is this correct or not? I'm not sure.
ysl2 opened this issue · comments
#if SCRATCHPADS_PATCH && !RENAMED_SCRATCHPADS_PATCH
shifted.ui = selmon->tagset[selmon->seltags];
#else
shifted.ui = selmon->tagset[selmon->seltags];
#endif // SCRATCHPADS_PATCH
Lines 8 to 12 in d807d3d
Good question.
Looking at the changes in 20692be it seems that the shiftboth
, shiftswaptags
and shifttag
functions had this code / issue, while shifttagclients
, shiftview
and shiftviewclients
had this:
#if SCRATCHPADS_PATCH && !RENAMED_SCRATCHPADS_PATCH
shifted.ui = selmon->tagset[selmon->seltags] & ~SPTAGMASK;
#else
shifted.ui = selmon->tagset[selmon->seltags];
#endif // SCRATCHPADS_PATCH
So I think the first case should have that & ~SPTAGMASK
added to it. I suppose it is a good example of how much fuzz it creates when one decides to add special tags to hold scratchpad clients (and why the named scratchpads patch causes a lot less conflicts).
Thanks for your kind explain! You are really a patient person, and you have done excellent work for dwm community!! Thank you :-)