summaryrefslogtreecommitdiffhomepage
path: root/patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch')
-rw-r--r--patch/fullscreen.c4
-rw-r--r--patch/warp.c20
2 files changed, 13 insertions, 11 deletions
diff --git a/patch/fullscreen.c b/patch/fullscreen.c
index ac50f37..f0f2726 100644
--- a/patch/fullscreen.c
+++ b/patch/fullscreen.c
@@ -3,9 +3,11 @@ Layout *last_layout;
void
fullscreen(const Arg *arg)
{
+ int monocle_pos;
if (selmon->showbar || last_layout == NULL) {
+ for (monocle_pos = 0, last_layout = (Layout *)layouts; !last_layout->arrange || last_layout->arrange != &monocle; monocle_pos++, last_layout++ );
for (last_layout = (Layout *)layouts; last_layout != selmon->lt[selmon->sellt]; last_layout++);
- setlayout(&((Arg) { .v = &layouts[MONOCLE_LAYOUT_POS] }));
+ setlayout(&((Arg) { .v = &layouts[monocle_pos] }));
} else {
setlayout(&((Arg) { .v = last_layout }));
}
diff --git a/patch/warp.c b/patch/warp.c
index 1cbf4b9..acc69f8 100644
--- a/patch/warp.c
+++ b/patch/warp.c
@@ -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);
-} \ No newline at end of file
+}