Path: utzoo!attcan!uunet!lll-winken!arisia!sgi!daisy!klee From: klee@daisy.UUCP (Ken Lee) Newsgroups: comp.windows.x Subject: Re: XNextEvent vs. select(2) Message-ID: <2214@daisy.UUCP> Date: 22 Dec 88 00:01:41 GMT Reply-To: klee@daisy.UUCP (Ken Lee) Organization: Daisy Systems Corp., Mountain View, Ca. Lines: 21 I asked about combining XNextEvent() with select(). Several people responded with the solution. Several others asked for a summary of responses, as they had the same problem. Thanks to all that helped me. The solution is simple: Get the X connection file descriptor with ConnectionNumber(dpy) or XConnectionNumber(dpy) (Xlib manual section 2.2.1). Do a select on this and any other interesting fd's (including sockets). If the X connection fd fires, read it with XNextEvent. Read your other fd's as you would normally. Thanks again for your help! Ken Lee Daisy Systems Corp., Interactive Graphics Tools Dept. -- uucp: uunet!daisy!klee arpanet: daisy!klee@uunet.uu.net "DC6 which is being used for [Contra weapons supply] runs out of New Orleans is probably being used for drug runs into U.S." - Oliver North, August, 1985