X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=tag.c;h=6b7e18429d626b8e9a93e56bf15179db189aaf21;hb=57416beefec4db451a75a1d25434b69cf50badad;hp=13e22af0980110d93822cee21528ae7ba4281f52;hpb=937cabfa0aad7eef6d25e9d142a478163de200c5;p=dwm.git diff --git a/tag.c b/tag.c index 13e22af..6b7e184 100644 --- a/tag.c +++ b/tag.c @@ -67,6 +67,8 @@ dofloat(Arg *arg) higher(sel); focus(sel); } + else + XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); } drawall(); } @@ -130,6 +132,8 @@ dotile(Arg *arg) higher(sel); focus(sel); } + else + XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); } drawall(); } @@ -212,3 +216,17 @@ view(Arg *arg) arrange(NULL); drawall(); } + +void +viewnext(Arg *arg) +{ + arg->i = (tsel < TLast-1) ? tsel+1 : 0; + view(arg); +} + +void +viewprev(Arg *arg) +{ + arg->i = (tsel > 0) ? tsel-1 : TLast-1; + view(arg); +}