mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 12:05:45 +00:00
[dwm][patch] swapfocus just focus next client after tag or toggletag
This commit is contained in:
parent
d644c89c74
commit
8f53248a0f
15
dwm.c
15
dwm.c
@ -3100,11 +3100,18 @@ spawn(const Arg *arg)
|
||||
void
|
||||
tag(const Arg *arg)
|
||||
{
|
||||
#if SWAPFOCUS_PATCH && PERTAG_PATCH
|
||||
unsigned int tagmask, tagindex;
|
||||
#endif // SWAPFOCUS_PATCH
|
||||
|
||||
if (selmon->sel && arg->ui & TAGMASK) {
|
||||
selmon->sel->tags = arg->ui & TAGMASK;
|
||||
focus(NULL);
|
||||
#if SWAPFOCUS_PATCH && PERTAG_PATCH
|
||||
selmon->pertag->prevclient[selmon->pertag->curtag] = NULL;
|
||||
for (tagmask = arg->ui & TAGMASK, tagindex = 1; tagmask!=0; tagmask >>= 1, tagindex++)
|
||||
if (tagmask & 1)
|
||||
selmon->pertag->prevclient[tagindex] = NULL;
|
||||
#endif // SWAPFOCUS_PATCH
|
||||
arrange(selmon);
|
||||
#if VIEWONTAG_PATCH
|
||||
@ -3218,6 +3225,9 @@ void
|
||||
toggletag(const Arg *arg)
|
||||
{
|
||||
unsigned int newtags;
|
||||
#if SWAPFOCUS_PATCH && PERTAG_PATCH
|
||||
unsigned int tagmask, tagindex;
|
||||
#endif // SWAPFOCUS_PATCH
|
||||
|
||||
if (!selmon->sel)
|
||||
return;
|
||||
@ -3225,6 +3235,11 @@ toggletag(const Arg *arg)
|
||||
if (newtags) {
|
||||
selmon->sel->tags = newtags;
|
||||
focus(NULL);
|
||||
#if SWAPFOCUS_PATCH && PERTAG_PATCH
|
||||
for (tagmask = arg->ui & TAGMASK, tagindex = 1; tagmask!=0; tagmask >>= 1, tagindex++)
|
||||
if (tagmask & 1)
|
||||
selmon->pertag->prevclient[tagindex] = NULL;
|
||||
#endif // SWAPFOCUS_PATCH
|
||||
arrange(selmon);
|
||||
}
|
||||
#if EWMHTAGS_PATCH
|
||||
|
Loading…
x
Reference in New Issue
Block a user