[comp.windows.x] borders in awm

brooks@vette.llnl.gov (12/02/88)

Awm uses a Pixmap called "SolidPixmap" for borders of the
window in focus, and "GreyPixmap" for borders of windows out
of focus.  SolidPixmap turns out to be black on my setup and
I have tried messing with resources to get white borders but
have failed.  Is there a way to get a "SolidPixmap" which is
white instead of black, but otherwize keep everything else
the same?  I am willing to mung the code if need be.

jdi@sparky.UUCP (John Irwin) (12/03/88)

Your message:

    
    Awm uses a Pixmap called "SolidPixmap" for borders of the
    window in focus, and "GreyPixmap" for borders of windows out
    of focus.  SolidPixmap turns out to be black on my setup and
    I have tried messing with resources to get white borders but
    have failed.  Is there a way to get a "SolidPixmap" which is
    white instead of black, but otherwize keep everything else
    the same?  I am willing to mung the code if need be.

--------

There is a bug in awm that prevents the "reverse" option from working.  (It's
used before it's set)  Reverse is what you want.  Here's the fix:

*** awm.c~	Fri Oct 14 11:36:00 1988
--- awm.c	Mon Nov 21 14:20:22 1988
***************
*** 726,731 ****
--- 726,732 ----
       /* Default foreground/background colors (text) */
       Foreground = GetStringRes("foreground", "black");
       Background = GetStringRes("background", "white");
+      Reverse = GetBoolRes("reverse", FALSE);
       
       if (Reverse) { /* Swap the foreground and background */
  	  char *tmp;
***************
*** 755,761 ****
       ShowName = GetBoolRes("showName", TRUE);
       NWindow = GetBoolRes("normalw", TRUE);
       Push = GetBoolRes("pushRelative", FALSE);
-      Reverse = GetBoolRes("reverse", FALSE);
       SaveUnder = GetBoolRes("saveUnder", FALSE);
       Wall = GetBoolRes("wall", FALSE);
       WarpOnRaise = GetBoolRes("warpOnRaise", FALSE);
--- 756,761 ----

Also -- has anyone else had a problem with awm sitting and eating up CPU time?
To keep it from doing that on a sun4/260 (Release 3) I had to make the Iconify
function return leave(TRUE) instead of leave(FALSE) so that awm doesn't loop
waiting for the button to be released.

	-- John

tom@ICASE.EDU (Tom Crockett) (12/06/88)

>  Awm uses a Pixmap called "SolidPixmap" for borders of the
>  window in focus, and "GreyPixmap" for borders of windows out
>  of focus.  SolidPixmap turns out to be black on my setup and
>  I have tried messing with resources to get white borders but
>  have failed.  Is there a way to get a "SolidPixmap" which is
>  white instead of black, but otherwize keep everything else
>  the same?  I am willing to mung the code if need be.

I do the following to get solid black borders when the window is in focus and
white borders when it is out of focus:

*BorderWidth:           0
awm.border.foreground:  black
awm.border.hilite:      on
awm.borderContexts:     on
awm.borderContext.background:   white
awm.borderContext.foreground:   black
awm.borderContext.cursor:       36
awm.borderContext.boldPixmap:   black
awm.borderContext.width:        4

The "black" pixmap is, as you might expect, solid black.  If you want it the
other way around, try reversing the foreground and background colors for the
borderContext.


Tom Crockett

--------------------------------------------------------------------------------
Institute for Computer Applications in Science and Engineering
M.S. 132C, NASA Langley Research Center
Hampton, VA  23665

e-mail:  tom@icase.edu		phone:   (804) 865-4097
--------------------------------------------------------------------------------