Adding sticky and warp patches
parent
713c4e6197
commit
30e0a3b5e4
@ -0,0 +1,8 @@
|
||||
void
|
||||
togglesticky(const Arg *arg)
|
||||
{
|
||||
if (!selmon->sel)
|
||||
return;
|
||||
selmon->sel->issticky = !selmon->sel->issticky;
|
||||
arrange(selmon);
|
||||
}
|
@ -0,0 +1 @@
|
||||
static void togglesticky(const Arg *arg);
|
@ -0,0 +1,21 @@
|
||||
void
|
||||
warp(const Client *c)
|
||||
{
|
||||
int x, y;
|
||||
|
||||
if (!c) {
|
||||
XWarpPointer(dpy, None, root, 0, 0, 0, 0, selmon->wx + selmon->ww/2, selmon->wy + selmon->wh/2);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!getrootptr(&x, &y) ||
|
||||
(x > c->x - c->bw &&
|
||||
y > c->y - c->bw &&
|
||||
x < c->x + c->w + c->bw*2 &&
|
||||
y < c->y + c->h + c->bw*2) ||
|
||||
(y > c->mon->by && y < c->mon->by + bh) ||
|
||||
(c->mon->topbar && !y))
|
||||
return;
|
||||
|
||||
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w / 2, c->h / 2);
|
||||
}
|
@ -0,0 +1 @@
|
||||
static void warp(const Client *c);
|
Loading…
Reference in New Issue