Xref: utzoo comp.windows.x.motif:2898 comp.windows.x:36395 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!ox.com!math.fu-berlin.de!unido!ztivax!ap542!david From: david@ap542.uucp Newsgroups: comp.windows.x.motif,comp.windows.x Subject: Re: Controlling Widgets on different Displays Message-ID: <1991May14.064136.7193@ap542.uucp> Date: 14 May 91 06:41:36 GMT References: <1270@dcl-vitus.comp.lancs.ac.uk> <1991Apr25.124158@wsl.dec.com> Sender: news@ap542.uucp (News Admin) Organization: Siemens-Nixdorf AG, AP 341 Lines: 25 klee@wsl.dec.com writes: >julian@comp.lancs.ac.uk (Julian G. Self) writes: >|> I am trying to write some code that gives me two topLevelShellWidget's but >|> with each one being on a different display. > >You can use XtOpenDisplay() and XtCreateApplicationShell() to create >shell widgets on as many displays as you wish. You can also do >XtGetApplicationResources() on each display to get per-display >resources. Putting all the displays in the same application context >greatly simplifies event handling, but is not required. Also, if you are using Motif, you will have problems unless those other display connections are maintained until you exit your application due to the inappropriate cacheing of shadow pixmaps. If you've got source, you can (and must) fix this bug. Its easy to find (run it, and the problem is (thankfully) right where it crashes when you are creating a new widget tree after you have closed a previous display connection and destroyed that widget tree). You can either take out the stupid pixmap cache, or provide a destroy callback on the application shell to clear out the pixmap cache on that display. If you don't have source, why the hell don't you !?! david%ap542@ztivax.siemens.com