Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!julius.cs.uiuc.edu!apple!agate!linus!linus!pop From: pop@linus.mitre.org (Paul O. Perry) Newsgroups: comp.windows.x.motif Subject: Re: Multiple Displays in Xt (again) Message-ID: Date: 7 Nov 90 20:50:26 GMT Sender: usenet@linus.mitre.org Distribution: comp.windows.x.motif Organization: The MITRE Corporation Lines: 51 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 using the select(), and maybe putting a cutoff (an event quantum) to the number of events you will handle for one context at any one time. This should prevent any one user from starving everybody else. If there is a better way to do this let me know. I tried this out with an application I have and ran into the same problem : X Error of failed request: BadCursor (invalid Cursor parameter) Major opcode of failed request: 1 (X_CreateWindow) Minor opcode of failed request: 0 Resource id in failed request: 0xa00099 Serial number of failed request: 417 Current serial number in output stream: 460 I'm useing X11R4 to patch level 18 and Motif1.1. Anyone know what I'm missing ? P.S. Should I make unique copies of all the elements of argv for each XtOpenDisplay, or can I use the same strings in the different argv's? Now this seems relevant. I would think that this is what you have to do if for example you want users to be able to use multiple -d's at the command line. Thanks, Paul. -- Paul O. Perry MITRE Corporation Phone: (617) 271-5230 Burlington Road ARPA: pop@mitre.org Bedford, MA 01730 UUCP: ...{decvax,philabs,genrad}!linus!pop