Path: utzoo!attcan!uunet!aplcen!haven!decuac!shlump.nac.dec.com!shodha.dec.com!gsrc.dec.com!west From: west@gsrc.dec.com (Jim West (Stealth Contractor)) Newsgroups: comp.windows.x Subject: Re: Really waiting for events. Message-ID: <1420@shodha.dec.com> Date: 12 Jul 90 14:12:52 GMT Sender: news@shodha.dec.com Organization: Digital Equipment Corporation Lines: 38 In article , markf@zurich.ai.mit.edu (Mark Friedman) writes... -What do I do when I want to wait for an event from ANY of the displays -that I have opened? On unix I suppose I could do a select using the -ConnectionNumber's from the various displays, but this is not -portable. I'm also not sure whether this would work on systems that -try to optimimize client-server connections through shared memory when -the client and server are on the same machine. Does anyone have any -better ideas? - --Mark --- - -Mark Friedman -MIT Artificial Intelligence Lab -545 Technology Sq. -Cambridge, Ma. 02139 - -markf@zurich.ai.mit.edu From Xlib just use XNextEvent. 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. From the Toolkit you could use the same method as above or use Application Context variables. One for each display connection and then use XtAppNextEvent to poll for events from a given display connection. ---------------------------------------------------------------------- Jim West | The Schainker Converse west@gsrc.dec.com | to Hoare's Law : | These are my opinions. | Inside every small problem Digital has no idea | is a larger problem struggling what I'm saying. | to get out. ----------------------------------------------------------------------