diff options
| author | ProsperousPotato <ProsperousPotato@users.noreply.github.com> | 2025-02-06 13:29:24 +0000 |
|---|---|---|
| committer | ProsperousPotato <ProsperousPotato@users.noreply.github.com> | 2025-03-31 18:31:28 +0100 |
| commit | 84ab815e68ba89c914904a55378848e92ba00bd7 (patch) | |
| tree | c84b17689144f231a0eb42eb84c576d18d11ef80 /dwm.c | |
| parent | 0effca558c366a7feea24c94eef3e06d4ea72f82 (diff) | |
warp cursor to center of screen when fullscreen
Diffstat (limited to 'dwm.c')
| -rw-r--r-- | dwm.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); } } |
