From: Alan W. I. <ir...@be...> - 2001-11-28 12:50:15
|
On Wed, 28 Nov 2001, H C Pumphrey wrote: > [A message or two back, I wrote...] > > > P.S. I am wondering if [the window title bug] is the cause of some of > > the X weirdness on Solaris reported by others..... > > ... but now I suspect not. A fix was posted to the forum on the web site, > (at http://sourceforge.net/forum/forum.php?thread_id=105137&forum_id=8607) > but not to the mailing lists, which appears to fix the screeds of X > errors. > > The fix has a 1-letter misprint. With that corrected, it works and > doesn't break things on my Sun. The corrected statement is: > > dev->window = > XCreateWindow( xwd->display, > DefaultRootWindow(xwd->display), > hint.x, hint.y, hint.width, hint.height, > dev->border, XDefaultDepth(xwd->display,xwd->screen), > InputOutput,XDefaultVisual(xwd->display,xwd->screen), > 0, NULL ); > > Maybe this one has made it into the CVS tree -- I havn't checked it out > yet. Yes, I independently spotted that a couple days ago (and the typo), and put the change into CVS as a basis for further discussion for the development team. The workaround replaces xwd->depth and xwd->visual in the argument list by XDefaultDepth(xwd->display,xwd->screen) and XDefaultVisual(xwd->display,xwd->screen). The workaround certainly does work under Linux, and I am happy to see it has finally solved Valerij's problem on solaris (or is that sunos?) as well in those cases where he was not parsing the options. Nevertheless, the books are not closed on this one because it is likely to be a workaround for a more fundamental problem. I am not that familiar with xwin.c, but the guys on the development team who are may want to keep xwd->depth and xwd->visual so that non-default values are possible. However, (taking in account Valerij's results) those two values may not be defined correctly on Solaris for some reason when option parsing has not been utilized. Or under the same conditions, they might not be defined on Linux, but the Linux X server might be able to overcome the error so we don't notice it in that case. Anyhow, it is poor policy to cover up bad xwd->depth and xwd->visual values by using default values instead so I am hoping the xwin.c experts on the development team will take a further look at this. Alan email: ir...@be... phone: 250-727-2902 FAX: 250-721-7715 snail-mail: Dr. Alan W. Irwin Department of Physics and Astronomy, University of Victoria, P.O. Box 3055, Victoria, British Columbia, Canada, V8W 3P6 __________________________ Linux-powered astrophysics __________________________ |