Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!rpi!zaphod.mps.ohio-state.edu!usc!snorkelwacker!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse From: mouse@LARRY.MCRCIM.MCGILL.EDU (der Mouse) Newsgroups: comp.windows.x Subject: Re: Really waiting for events. Message-ID: <9007140508.AA02656@Larry.McRCIM.McGill.EDU> Date: 14 Jul 90 05:08:25 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 25 >> What do I do when I want to wait for an event from ANY of the >> displays that I have opened? All I can suggest is the select() solution you are clearly already aware of. I don't know of any more portable way. > From Xlib just use XNextEvent. Read the initial posting. Using XNextEvent assumes prior knowledge of which display connection the next event will arrive on, or at least assumes that all other displays can be ignored until an event arrives over one of them. > The event structure will have the display ID in it. You could use > this to determine which display (and window) the event was generated > for. Which is perfectly true but irrelevant to the central problem: wait for an event on any one of several display connections, without knowing which one the next even will arrive over. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu