aboutsummaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@wmii.de>2006-07-12 00:00:25 +0200
committerAnselm R. Garbe <garbeam@wmii.de>2006-07-12 00:00:25 +0200
commit2a0fc84c4af2257d79c4c7cb37131c4acb763162 (patch)
treee335ce623b7f79186b52bc1d73acbfead90cab08 /client.c
parent896f08d7d553f7def3877648c113cf03e6ca546a (diff)
downloaddwm-2a0fc84c4af2257d79c4c7cb37131c4acb763162.tar.gz
some more additions/fixes
Diffstat (limited to 'client.c')
-rw-r--r--client.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/client.c b/client.c
index eb3acf4..ee659c4 100644
--- a/client.c
+++ b/client.c
@@ -93,6 +93,7 @@ focus(Client *c)
}
XUnmapWindow(dpy, c->title);
draw_bar();
+ discard_events(EnterWindowMask);
XFlush(dpy);
}
@@ -116,7 +117,7 @@ manage(Window w, XWindowAttributes *wa)
XGetTransientForHint(dpy, c->win, &c->trans);
twa.override_redirect = 1;
twa.background_pixmap = ParentRelative;
- twa.event_mask = SubstructureNotifyMask | ExposureMask;
+ twa.event_mask = ExposureMask;
c->title = XCreateWindow(dpy, root, c->tx, c->ty, c->tw, c->th,
0, DefaultDepth(dpy, screen), CopyFromParent,
@@ -191,11 +192,19 @@ unmanage(Client *c)
XFlush(dpy);
XSetErrorHandler(error_handler);
XUngrabServer(dpy);
- discard_events(EnterWindowMask);
if(stack)
focus(stack);
}
+Client *
+gettitle(Window w)
+{
+ Client *c;
+ for(c = clients; c; c = c->next)
+ if(c->title == w)
+ return c;
+ return NULL;
+}
Client *
getclient(Window w)
remember that computers suck.