summaryrefslogtreecommitdiff
path: root/dwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/dwm.c b/dwm.c
index 8cbede4..080184e 100644
--- a/dwm.c
+++ b/dwm.c
@@ -959,7 +959,7 @@ focusmon(const Arg *arg)
selmon = m;
focus(NULL);
if (selmon->sel)
- XWarpPointer(dpy, None, selmon->sel->win, 0, 0, 0, 0, selmon->sel->w/2, selmon->sel->h/2);
+ XWarpPointer(dpy, None, selmon->sel->win, 0, 0, 0, 0, selmon->sel->w/2, selmon->sel->h/2);
}
void
@@ -1886,6 +1886,7 @@ setfullscreen(Client *c, int fullscreen)
c->isfloating = 1;
resizeclient(c, c->mon->mx, c->mon->my, c->mon->mw, c->mon->mh);
XRaiseWindow(dpy, c->win);
+ XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w/2, c->h/2);
} else if (!fullscreen && c->isfullscreen){
XChangeProperty(dpy, c->win, netatom[NetWMState], XA_ATOM, 32,
PropModeReplace, (unsigned char*)0, 0);
@@ -1898,6 +1899,7 @@ setfullscreen(Client *c, int fullscreen)
c->h = c->oldh;
resizeclient(c, c->x, c->y, c->w, c->h);
arrange(c->mon);
+ XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w/2, c->h/2);
}
}