drapeau@jessica.stanford.edu (George D. Drapeau) (04/11/89)
Here's my environment, first of all: Sun4/110, SunOS 4.0.1, X11R3 with Purdue patches and fixes 1-9. The problem I'm having is with several applications that use the X Toolkit, but I'll limit my question to xedit. Here's the deal: I'm trying to setup my .Xdefaults file so that if I'm not using a color server, my windows will be white-on-black for the most part. The quickest way for me to do this was to have an entry at the top of my .Xdefaults file that said something like this: #ifdef COLOR !color specs here #else *ReverseVideo: on #endif I'm not sure if this is the best way to go about it, but for the most part it works. However, for some programs (namely xedit) it does not work. Specifically, the large window in which you type text (called the "editWindow") should be white characters on black background, but that doesn't happen. Instead what I seem to get is black on black, so I can't see anything. After reading the xedit man page, I put these lines in my .Xdefaults file: *ReverseVideo: off xedit*editWindow*Foreground: White xedit*editWindow*Background: Black (so I tried to force a 'reversevideo' effect on just the one window) The effect was that the editWindow's scrollbar background became black, but the text in that window remained black on white, opposite of what I expected. One more thing. When I tried to be more general and use the following: *ReverseVideo: off xedit*Text*Foreground: White xedit*Text*Background: Black the effect was that both scrollbars' backgrounds became black, the three small input boxes became white-on-black, but the 'messageWindow' and 'editWindow' remained black-on-white. What am I doing wrong here? I have observed similar behavior from 'xmh' and 'xman'. And if these programs exhibit the behavior I described, why doesn't xterm? Any help you could provide would be much appreciated. Thanks in advance, Confused and Anxious ______________________________________________________________________________ George D. Drapeau Internet: drapeau@jessica.stanford.edu Academic Information Resources Stanford University
kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (04/19/89)
> #ifdef COLOR > !color specs here > #else > *ReverseVideo: on > #endif > I'm not sure if this is the best way to go about it, but for the most part it > works. However, for some programs (namely xedit) it does not work. > Specifically, the large window in which you type text (called the > "editWindow") should be white characters on black background, but that > doesn't happen. Instead what I seem to get is black on black, so I can't see > anything. This is a known and fixed bug in the Athena Text Widget. This bug causes it to ignore the reverse video parameters. Here is a quick fix. This is not an "official" patch, and may cause your sources to conflict with future patches, but it does fix the problem. The other option is to specify "Foreground", "Background", and "BorderColor" resources which will allow things to work. Chris D. Peterson MIT X Consortium *** lib/Xaw/AsciiSink.c Tue Apr 18 14:55:14 1989 --- /tmp/,RCSt2a20304 Tue Apr 18 14:55:20 1989 *************** *** 53,65 **** static char *buf = NULL; - /* XXX foreground default should be XtDefaultFGPixel. How do i do that?? */ - static XtResource SinkResources[] = { {XtNfont, XtCFont, XtRFontStruct, sizeof (XFontStruct *), XtOffset(AsciiSinkPtr, font), XtRString, "Fixed"}, {XtNforeground, XtCForeground, XtRPixel, sizeof (int), ! XtOffset(AsciiSinkPtr, foreground), XtRString, "Black"}, }; /* Utilities */ --- 53,63 ---- static char *buf = NULL; static XtResource SinkResources[] = { {XtNfont, XtCFont, XtRFontStruct, sizeof (XFontStruct *), XtOffset(AsciiSinkPtr, font), XtRString, "Fixed"}, {XtNforeground, XtCForeground, XtRPixel, sizeof (int), ! XtOffset(AsciiSinkPtr, foreground), XtRString, "XtDefaultForeground"} }; /* Utilities */