stop waiting for events in queue
This commit is contained in:
parent
2ac27fdac4
commit
a57d81237a
11
awesome.c
11
awesome.c
|
@ -389,7 +389,15 @@ main(int argc, char *argv[])
|
|||
buf[r] = '\0';
|
||||
parse_control(buf);
|
||||
}
|
||||
|
||||
/* two level XPending:
|
||||
* we need to first check we have XEvent to handle
|
||||
* and if so, we handle them all in a round.
|
||||
* Then when we have refresh()'ed stuff so maybe new XEvent
|
||||
* are available and select() won't tell us, so let's check
|
||||
* with XPending() again.
|
||||
*/
|
||||
while(XPending(dpy))
|
||||
{
|
||||
while(XPending(dpy))
|
||||
{
|
||||
XNextEvent(dpy, &ev);
|
||||
|
@ -415,6 +423,7 @@ main(int argc, char *argv[])
|
|||
/* need to resync */
|
||||
XSync(dpy, False);
|
||||
}
|
||||
}
|
||||
|
||||
if(csfd > 0 && close(csfd))
|
||||
perror("error closing UNIX domain socket");
|
||||
|
|
Loading…
Reference in New Issue