Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
725 B

  1. void
  2. moveplace(const Arg *arg)
  3. {
  4. Client *c;
  5. int nh, nw, nx, ny;
  6. c = selmon->sel;
  7. if (!c || (arg->ui >= 9))
  8. return;
  9. if (selmon->lt[selmon->sellt]->arrange && !c->isfloating)
  10. togglefloating(NULL);
  11. nh = (selmon->wh / 3) - (c->bw * 2);
  12. nw = (selmon->ww / 3) - (c->bw * 2);
  13. nx = (arg->ui % 3) -1;
  14. ny = (arg->ui / 3) -1;
  15. if (nx < 0)
  16. nx = selmon->wx;
  17. else if (nx > 0)
  18. nx = selmon->wx + selmon->ww - nw - c->bw*2;
  19. else
  20. nx = selmon->wx + selmon->ww/2 - nw/2 - c->bw;
  21. if (ny <0)
  22. ny = selmon->wy;
  23. else if (ny > 0)
  24. ny = selmon->wy + selmon->wh - nh - c->bw*2;
  25. else
  26. ny = selmon->wy + selmon->wh/2 - nh/2 - c->bw;
  27. resize(c, nx, ny, nw, nh, True);
  28. XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, nw/2, nh/2);
  29. }