diff client.c @ 79:aabebd6e61f3

fixed XSync handling and finished man page
author Anselm R. Garbe <garbeam@wmii.de>
date Sat, 15 Jul 2006 18:51:44 +0200
parents 38c8f7f7d401
children 8125f908c80c
line wrap: on
line diff
--- a/client.c	Sat Jul 15 18:11:14 2006 +0200
+++ b/client.c	Sat Jul 15 18:51:44 2006 +0200
@@ -49,13 +49,12 @@
 	Client *old = sel;
 	XEvent ev;
 
-	XFlush(dpy);
 	sel = c;
 	if(old && old != c)
 		drawtitle(old);
 	drawtitle(c);
 	XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
-	XFlush(dpy);
+	XSync(dpy, False);
 	while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
 }
 
@@ -303,7 +302,7 @@
 	e.above = None;
 	e.override_redirect = False;
 	XSendEvent(dpy, c->win, False, StructureNotifyMask, (XEvent *)&e);
-	XFlush(dpy);
+	XSync(dpy, False);
 }
 
 void
@@ -393,7 +392,7 @@
 
 	free(c);
 
-	XFlush(dpy);
+	XSync(dpy, False);
 	XSetErrorHandler(xerror);
 	XUngrabServer(dpy);
 	arrange(NULL);