aewl

diff client.c @ 23:95ffdfd0a819

some more additions/fixes
author Anselm R. Garbe <garbeam@wmii.de>
date Wed, 12 Jul 2006 00:00:25 +0200
parents bd3a44353916
children e8f627998d6f
line diff
     1.1 --- a/client.c	Tue Jul 11 23:46:39 2006 +0200
     1.2 +++ b/client.c	Wed Jul 12 00:00:25 2006 +0200
     1.3 @@ -93,6 +93,7 @@
     1.4  	}
     1.5  	XUnmapWindow(dpy, c->title);
     1.6  	draw_bar();
     1.7 +	discard_events(EnterWindowMask);
     1.8  	XFlush(dpy);
     1.9  }
    1.10  
    1.11 @@ -116,7 +117,7 @@
    1.12  	XGetTransientForHint(dpy, c->win, &c->trans);
    1.13  	twa.override_redirect = 1;
    1.14  	twa.background_pixmap = ParentRelative;
    1.15 -	twa.event_mask = SubstructureNotifyMask | ExposureMask;
    1.16 +	twa.event_mask = ExposureMask;
    1.17  
    1.18  	c->title = XCreateWindow(dpy, root, c->tx, c->ty, c->tw, c->th,
    1.19  			0, DefaultDepth(dpy, screen), CopyFromParent,
    1.20 @@ -191,11 +192,19 @@
    1.21  	XFlush(dpy);
    1.22  	XSetErrorHandler(error_handler);
    1.23  	XUngrabServer(dpy);
    1.24 -	discard_events(EnterWindowMask);
    1.25  	if(stack)
    1.26  		focus(stack);
    1.27  }
    1.28  
    1.29 +Client *
    1.30 +gettitle(Window w)
    1.31 +{
    1.32 +	Client *c;
    1.33 +	for(c = clients; c; c = c->next)
    1.34 +		if(c->title == w)
    1.35 +			return c;
    1.36 +	return NULL;
    1.37 +}
    1.38  
    1.39  Client *
    1.40  getclient(Window w)