dwm-meillo

diff client.c @ 19:b5510d0c6d43

added basic mouse support (actually we don't need more)
author Anselm R. Garbe <garbeam@wmii.de>
date Tue, 11 Jul 2006 21:41:49 +0200
parents 1efa34c6e1b6
children 4560e0882c1d
line diff
     1.1 --- a/client.c	Tue Jul 11 21:24:10 2006 +0200
     1.2 +++ b/client.c	Tue Jul 11 21:41:49 2006 +0200
     1.3 @@ -70,8 +70,7 @@
     1.4  	c->r[RFloat].y = wa->y;
     1.5  	c->r[RFloat].width = wa->width;
     1.6  	c->r[RFloat].height = wa->height;
     1.7 -	c->border = wa->border_width;
     1.8 -	XSetWindowBorderWidth(dpy, c->win, 0);
     1.9 +	XSetWindowBorderWidth(dpy, c->win, 1);
    1.10  	XSelectInput(dpy, c->win, CLIENT_MASK);
    1.11  	XGetTransientForHint(dpy, c->win, &c->trans);
    1.12  	if(!XGetWMNormalHints(dpy, c->win, &c->size, &msize) || !c->size.flags)
    1.13 @@ -97,7 +96,11 @@
    1.14  	c->snext = stack;
    1.15  	stack = c;
    1.16  	XMapWindow(dpy, c->win);
    1.17 -	XGrabButton(dpy, AnyButton, Mod1Mask, c->win, False, ButtonPressMask,
    1.18 +	XGrabButton(dpy, Button1, Mod1Mask, c->win, False, ButtonPressMask,
    1.19 +			GrabModeAsync, GrabModeSync, None, None);
    1.20 +	XGrabButton(dpy, Button2, Mod1Mask, c->win, False, ButtonPressMask,
    1.21 +			GrabModeAsync, GrabModeSync, None, None);
    1.22 +	XGrabButton(dpy, Button3, Mod1Mask, c->win, False, ButtonPressMask,
    1.23  			GrabModeAsync, GrabModeSync, None, None);
    1.24  	focus(c);
    1.25  }
    1.26 @@ -116,7 +119,7 @@
    1.27  	e.y = c->r[RFloat].y;
    1.28  	e.width = c->r[RFloat].width;
    1.29  	e.height = c->r[RFloat].height;
    1.30 -	e.border_width = c->border;
    1.31 +	e.border_width = 0;
    1.32  	e.above = None;
    1.33  	e.override_redirect = False;
    1.34  	XSelectInput(dpy, c->win, CLIENT_MASK & ~StructureNotifyMask);