Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!ncar!ico!attc!marbru From: marbru@attc.UUCP (Martin Brunecky) Newsgroups: comp.windows.x.motif Subject: Re: Multiple Displays in Xt (again) Message-ID: <903@attc.UUCP> Date: 9 Nov 90 05:48:39 GMT References: Reply-To: marbru@auto-trol.UUCP (Martin Brunecky) Distribution: comp.windows.x.motif Organization: Auto-trol Technology, Denver Lines: 39 In article pop@linus.mitre.org (Paul O. Perry) writes: > > From hagerman@ece.cmu.edu Wed Nov 7 14:59:32 1990 > > So I tried to work around the problem with a gross hack: I initialize > the toolkit, and then for each display I create an application context > and do an XtOpenDisplay. Then instead of XtAppMainLoop I use my own > routine that checks for and dispatches events for each application > context in a round-robin fashion (no use of select, so the loop uses > all available cycles). I had hoped that the bad state information > would be in the application context, but apparently not; I still get > the same error when I try to open multiple displays. > > Does anyone know of a successful work-around? > >I don't see this as a gross hack, this is the way I thought you would >have to support multiple displays. I would improve the event loop by I think you are wrong here. My programs use a single app-context, multiple XtOpenDisplay and work just fine. Creating multiple app-contexts only causes problems. The toolkit has been designed to deal with multiple displays under a single app context, and (unless you have a bad version of toolkit) it does it right. Including proper event dispatching, time sequencing (with obvious limitations), send event delivery etc. So, instead of inventig gross hacks, I'd look at your tooolkit. May be it does not have some of the mandatory patches. Or may be you did something wrong in the first place. -- =*= Opinions presented here are solely of my own and not those of Auto-trol =*= Martin Brunecky [BORN TO BASH UIL] marbru@auto-trol.COM (303) 252-2499 {...}ncar!ico!auto-trol!marbru Auto-trol Technology Corp. 12500 North Washington St., Denver, CO 80241-2404