diff -r bd3a44353916 -r 95ffdfd0a819 client.c --- a/client.c Tue Jul 11 23:46:39 2006 +0200 +++ b/client.c Wed Jul 12 00:00:25 2006 +0200 @@ -93,6 +93,7 @@ } XUnmapWindow(dpy, c->title); draw_bar(); + discard_events(EnterWindowMask); XFlush(dpy); } @@ -116,7 +117,7 @@ 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 @@ 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)