diff options
Diffstat (limited to 'dwm.c')
| -rw-r--r-- | dwm.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -234,6 +234,7 @@ static int xerror(Display *dpy, XErrorEvent *ee); static int xerrordummy(Display *dpy, XErrorEvent *ee); static int xerrorstart(Display *dpy, XErrorEvent *ee); static void zoom(const Arg *arg); +static void togglemouse(const Arg *arg); static pid_t getparentprocess(pid_t p); static int isdescprocess(pid_t p, pid_t c); @@ -1553,6 +1554,12 @@ setup(void) scheme = ecalloc(LENGTH(colors), sizeof(Clr *)); for (i = 0; i < LENGTH(colors); i++) scheme[i] = drw_scm_create(drw, colors[i], 4); + + /* init mouse */ + if (mouse_default == 0) { + togglemouse(0); + } + /* supporting window for NetWMCheck */ wmcheckwin = XCreateSimpleWindow(dpy, root, 0, 0, 1, 1, 0, 0, 0); XChangeProperty(dpy, wmcheckwin, netatom[NetWMCheck], XA_WINDOW, 32, @@ -2210,6 +2217,8 @@ zoom(const Arg *arg) if (c == nexttiled(selmon->clients) && !(c = nexttiled(c->next))) return; pop(c); + + XWarpPointer(dpy, None, selmon->sel->win, 0, 0, 0, 0, selmon->sel->w/2, selmon->sel->h/2); } int |
