Minor refactoring of warp and fullscreen patches, getting rid of MONOCLE_LAYOUT_POS setting

This commit is contained in:
bakkeby
2020-08-27 06:26:48 +02:00
parent f45acf8795
commit e952cc9a81
5 changed files with 31 additions and 17 deletions

View File

@@ -4,21 +4,21 @@ 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);
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) ||
x < c->mon->wx ||
x > c->mon->wx + c->mon->ww ||
y < c->mon->wy ||
y > c->mon->wy + c->mon->wh
(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) ||
x < c->mon->wx ||
x > c->mon->wx + c->mon->ww ||
y < c->mon->wy ||
y > c->mon->wy + c->mon->wh
)
return;
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w / 2, c->h / 2);
}
}