Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-lines From: mouse@lightning.mcrcim.mcgill.EDU Newsgroups: comp.windows.x Subject: Re: DECwindows DisplayString Message-ID: <9101240742.AA02953@lightning.McRCIM.McGill.EDU> Date: 24 Jan 91 07:42:56 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 41 > Basically, my DECwindows code is designed to use two CRTs (when > available). I'm currently using a VAXstation 3100 with a color > monitor and a black and white monitor. > The first thing my code does is to open a temporary connection and > determine how many monitors are on the workstation: > display = XOpenDisplay(""); > num_screens = ScreenCount(display); [...] > Now this is where I use the display name I got beforehand: every time > I call XtOpenDisplay, I give it the display name with the last > character modified to be the screen number. > For example, if the workstation's node name is NODE1, and it has two > screens, I call XtOpenDisplay twice, the first time giving it the > display name of "NODE1::0.0" and the second time giving it the > display name of "NODE1::0.1". (In passing, note that modifying the last character will break as soon as you have more than nine screens.) Why not just XOpenDisplay() once, then use different screens on that connection? Once you've connected to a given display, you can manipulate windows on all the screens on that display. All the trailing number indicates is which screen is the default - but you are not restricted to working with the default screen. Um. I just noticed you said XtOpenDisplay. I don't know what Xt does for this. You may have to give up until Xt catches up with displays with multiple screens...or go to writing in Xlib instead, if you feel it worth the pain of learning an entirely new (and probably weaker) set of tools. Perhaps some Xt wizard can explain how to take the result of XOpenDisplay and use all of the screens it provides.... der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu