Path: utzoo!attcan!uunet!wuarchive!udel!rochester!pt.cs.cmu.edu!o.gp.cs.cmu.edu!hagerman From: hagerman@ece.cmu.edu (John Hagerman) Newsgroups: comp.windows.x Subject: Multiple Displays in Xt (again) Message-ID: Date: 5 Nov 90 20:21:04 GMT Sender: netnews@cs.cmu.edu (USENET News Group Software) Distribution: comp Organization: Carnegie Mellon University Lines: 31 I said: > I can't seem to open multiple displays in my X Toolkit application. I > initialize the toolkit, create an application context, and then do an > XtOpenDisplay for each display. I can open the same display multiple > times, but not different displays. > [...] Der Mouse said: > I am fairly sure R3 Xt simply does not work right when you try to open > multiple displays. (Some of the Xt-private state information is not > correctly tagged according to which display it belongs to, so Xt tries > to use some things on displays they didn't come from. From your quoted > error message, it seems it does this with a Cursor in your case.) > [...] 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? Thanks - John -- hagerman@ece.cmu.edu