From: Alan W. I. <ir...@be...> - 2001-12-17 16:11:29
|
On Sun, 16 Dec 2001, Maurice LeBrun wrote: > The superior solution is as follows: > - turn the DEFAULT_VISUAL #define at the top of xwin.c into a configuration > variable instead > - the configure logic will set DEFAULT_VISUAL to 1 under SunOS, 0 otherwise. > > For DEFAULT_VISUAL set to 1, the following lines from GetVisual() will be used: > > if ( ! visuals_matched) { > xwd->visual = DefaultVisual( xwd->display, xwd->screen ); > xwd->depth = DefaultDepth( xwd->display, xwd->screen ); > } > > which will plug into XCreateWindow() in the same way as the DefaultXXX calls > now. > > I'll make the change. Thanks, Maurice. Two additional point here. (1) We have sunos users with this problem as well. I haven't looked at your cvs commits yet, but if you are detecting solaris at the configuration stage (rather than simply having a user option), then you may want to detect sunos as well. (2) I have one report that with the old (5.0.4) code on sunos, there was an interesting workaround. If this user called plParseOpts (indirectly through the yorick front-end, but I just checked the yplot code, and this is the only result of the yplot command he used) the xwin problem disappeared. If a call to plParseOpts solves the problem, perhaps that call is initializing things properly on sunos (and solaris?)? That might give us a clue how to do the initialization properly in general for those systems so we would no longer need to specify default values in xwin.c for those systems. Alan |