Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!samsung!usc!henry.jpl.nasa.gov!elroy.jpl.nasa.gov!jato!mars.jpl.nasa.gov!kaleb From: kaleb@mars.jpl.nasa.gov (Kaleb Keithley) Newsgroups: comp.windows.x Subject: Multiple Screens on a Sun Message-ID: <2077@jato.Jpl.Nasa.Gov> Date: 3 Nov 89 20:52:46 GMT Sender: news@jato.Jpl.Nasa.Gov Reply-To: kaleb@mars.jpl.nasa.gov (Kaleb Keithley) Organization: Jet Propulsion Laboratory, Pasadena, CA. Lines: 99 Keywords:multiple, Sun, Server We have a Sun4/260 which has two CG2 framebuffers with two Sun color monitors. We have experienced the same problem that has been reported over the net lately when trying to parent a client on screen 0 when running both screens. We are using the standard Mit release 3 server with the Purdue speedups. I wrote the following program to attempt to investigate the problem: #include #include #include static Display *display; main() { int loop; XWindowAttributes windowattributes; static char display_name[] = "unix:0"; if ((display = XOpenDisplay(display_name)) == 0) { printf("cannot open display %s\n",display_name); exit(1); } printf("display has %d screen(s)\n",display->nscreens); for (loop = 0; loop < display->nscreens; loop++) { printf("\nscreen %d root window id = 0x%x\n", loop, display->screens[loop].root); if (XGetWindowAttributes(display, display->screens[loop].root, &windowattributes)) { printf(" visual ptr in root windowattributes = 0x%x\n", windowattributes.visual); printf(" visual ptr in screen = 0x%x\n", display->screens[loop].root_visual); } } XCloseDisplay(display); } If I start the Server with -dev /dev/cgtwo0 and run the above program I get the following output: display has 1 screen(s) screen 0 root window id = 0x8006b visual ptr in root windowattributes = 0xf0f0 visual ptr in screen = 0xf0f0 This leads me to believe that the visual ptrs should be the same(?) If I start the Server without the -dev option it defaults to two screens and when I run the above program I get the following output: display has 2 screen(s) screen 0 root window id = 0x8006d visual ptr in root windowattributes = 0x0 visual ptr in screen = 0x0 screen 1 root window id = 0x80070 visual ptr in root windowattributes = 0xf190 visual ptr in screen = 0xf1e8 Three points come to mind: 1) The NULL pointer for the visual of screen 0 implies that no visual is attached to the screen, with some potential implications. XCreateSimpleWindow and XCreateWindow fail when the visual is inherited from the parent. What visual should be used to create a window on screen 0? 2) Why are the visual pointers on screen 1 different? The one screen scenario implies that they should be the same, or should they? 3) Since there seem to be two different visuals, is it that the Server is having trouble getting the visuals attached to the right screens? Does anyone have any ideas about where to go from here? Has this already been documented and fixed? In R3? In R4? Should I submit this to xbugs? Thank you "Where are we gonna go? -- Planet 10" Kaleb Keithley kaleb@mars.jpl.nasa.gov Jet Propulsion Laboratory (818)354-8771