diff options
author | Anselm R. Garbe <garbeam@wmii.de> | 2006-07-11 21:41:49 +0200 |
---|---|---|
committer | Anselm R. Garbe <garbeam@wmii.de> | 2006-07-11 21:41:49 +0200 |
commit | 48b6e9a3968e54a87f022c8e68b5bec5423cb75f (patch) | |
tree | 0c2fccdc7b2b18996840e8043bc1a95a1c897f40 /client.c | |
parent | b9da4b082eb658b4142b61c149212f414f7653b6 (diff) | |
download | dwm-48b6e9a3968e54a87f022c8e68b5bec5423cb75f.tar.gz |
added basic mouse support (actually we don't need more)
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/client.c b/client.c index e05fdd7..c11d5d5 100644 --- a/client.c +++ b/client.c @@ -70,8 +70,7 @@ manage(Window w, XWindowAttributes *wa) c->r[RFloat].y = wa->y; c->r[RFloat].width = wa->width; c->r[RFloat].height = wa->height; - c->border = wa->border_width; - XSetWindowBorderWidth(dpy, c->win, 0); + XSetWindowBorderWidth(dpy, c->win, 1); XSelectInput(dpy, c->win, CLIENT_MASK); XGetTransientForHint(dpy, c->win, &c->trans); if(!XGetWMNormalHints(dpy, c->win, &c->size, &msize) || !c->size.flags) @@ -97,7 +96,11 @@ manage(Window w, XWindowAttributes *wa) c->snext = stack; stack = c; XMapWindow(dpy, c->win); - XGrabButton(dpy, AnyButton, Mod1Mask, c->win, False, ButtonPressMask, + XGrabButton(dpy, Button1, Mod1Mask, c->win, False, ButtonPressMask, + GrabModeAsync, GrabModeSync, None, None); + XGrabButton(dpy, Button2, Mod1Mask, c->win, False, ButtonPressMask, + GrabModeAsync, GrabModeSync, None, None); + XGrabButton(dpy, Button3, Mod1Mask, c->win, False, ButtonPressMask, GrabModeAsync, GrabModeSync, None, None); focus(c); } @@ -116,7 +119,7 @@ resize(Client *c) e.y = c->r[RFloat].y; e.width = c->r[RFloat].width; e.height = c->r[RFloat].height; - e.border_width = c->border; + e.border_width = 0; e.above = None; e.override_redirect = False; XSelectInput(dpy, c->win, CLIENT_MASK & ~StructureNotifyMask); |