Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!ux1.cso.uiuc.edu!dino!cs.iastate.edu!narayan From: narayan@cs.iastate.edu (Pankaj Narayan) Newsgroups: comp.windows.x Subject: Folllowup question:MULTIPLE servers Message-ID: <287@dino.cs.iastate.edu> Date: 15 Jan 90 18:41:53 GMT Sender: usenet@dino.cs.iastate.edu Organization: Iowa State U. CS Department; Ames, IA Lines: 44 >From comp.windows.x Mon Jan 15 12:29:08 1990 >From: rws@EXPO.LCS.MIT.EDU (Bob Scheifler) >Date: 13 Jan 90 16:36:07 GMT >Subject: Re: Questions: mutiple servers poss.?? >> but here I want to put EACH window on a different >> display----choose 3 servers within one program, as it were. >You haven't stated whether you are using Xlib or some toolkit. At the >Xlib level, you can simply call XOpenDisplay more than once, using a >different display string each time, to connect to more than one display. >You'll have to invent some mechanism, like special command line options, I did that, but then get stuck at the while loop where I wait for expose events etc. while (1) { XGetNextEvent(display, &event) switch (event) { case Expose: ... etc... } /*of while*/ Basically, I can't get to call XGetNextEvent(display_1, &event) for each of the windows (i.e displays) in PARALLEL. Also, I can't call them one after another, since if I have XGetNextEvent(display_1, &event_1); XGetNextEvent(display_2, &event_2); and there is no event on display_1 while lots of events were being generated on display_2, then this would bomb. Any suggestions ? pankaj narayan iowa state univ