[alt.toolkits.xview] multiple-server code for XView 2.0 -- doesn't work?

quasar@krazykat.ctt.bellcore.com (Laurence R. Brothers) (09/11/90)

Does anyone have a simple WORKING example of code which connects to
multiple servers under XView 2.0?

I have several examples of code which worked with no problems under
XView 2.0 BETA -- I can't believe that they disabled the feature under
2.0, but the 2nd edition O'Reilly book appeared to have no changes.

The code I write compiles, runs, and displays the correct initial screens,
but as soon as I give input events to the second of two or more servers
(doesn't matter which is first), I get an X error -- "Bad Pixmap" -- tracking
down the source of the error generally shows it to be somewhere deep
in notifier calls, not anywhere in my code.

Just for laughs, I tried the thing on various machines, with various servers
and window managers -- the bug is exactly the same under Open Windows 2.0
with olwm as it is with twm running on the MIT sample server. The bug is
the same on sparcstations, sun 4/110's, and sun 4/260's, all running 
SunOs 4.0.3. I've mailed a short example to windowbugs@sun, but have not
gotten a response yet.

I'd hate to find a good technical reason to use Motif....

Incidentally, I use explicit dispatching as follows:

while(num_heads > 0) {
  notify_dispatch();
  for(i=0;i<num_heads;i++) {
    XFlush(/* the i'th display */);
  }
}

-- does this seem reasonable?

	         Laurence R. Brothers (quasar@bellcore.com)
      Bellcore -- Computer Technology Transfer -- Knowledge-Based Systems