Advertisement
Guest User

dwm-tag0-focus.patch

a guest
Sep 5th, 2012
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.82 KB | None | 0 0
  1. --- a/dwm.c     2011-12-19 16:02:46.000000000 +0100
  2. +++ b/dwm.c     2012-09-05 14:28:36.379761297 +0200
  3. @@ -424,6 +424,15 @@
  4.  }
  5.  
  6.  void
  7. +attach2stack(Client *c) {
  8. +       Client *t;
  9. +
  10. +       for(t = c->mon->stack; t->snext; t = t->snext);
  11. +       t->snext = c;
  12. +       c->snext = NULL;
  13. +}
  14. +
  15. +void
  16.  buttonpress(XEvent *e) {
  17.         unsigned int i, x, click;
  18.         Arg arg = {0};
  19. @@ -853,7 +862,10 @@
  20.                 if(c->isurgent)
  21.                         clearurgent(c);
  22.                 detachstack(c);
  23. -               attachstack(c);
  24. +               if(c->tags != TAGMASK)
  25. +                       attachstack(c);
  26. +               else
  27. +                       attach2stack(c);
  28.                 grabbuttons(c, True);
  29.                 XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]);
  30.                 setfocus(c);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement