Subject: another ActiveColorset patch: background won't show up

From: Darren Stuart Embry <[email-masked]>
Date: Mon, 14 Feb 2000 14:30:17 -0500

This little patch causes the background color from the
ActiveColorset to actually show up when highlighting a menu
item.

My previous ActiveColorset patch involved setting
ST_DO_HILIGHT(tmpms) = 1 if an ActiveColorset command was found,
IIRC to make the background color show up or something, but that
part didn't make it into the CVS tree because it has to be reset
if the colorset is deactivated.

My current way of making the background color show up is: when
checking to see if MST_DO_HILIGHT(mr) is set, also check if
MST_HAS_ACTIVE_CSET(mr) is set.

-- 
Darren Stuart Embry.  http://www.slug.louisville.edu/~dsembr01/

``In such ugly times, the only true protest is beauty.''
	-- Phil Ochs
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Darren Stuart Embry <[email-masked]>
Date: Mon, 14 Feb 2000 14:34:02 -0500

> MST_HAS_ACTIVE_CSET(mr) is set.

Mental note: when describing your patch, don't forget actually
*attach* it!  :)

Darren

-- 
Fun Times with Darren Stuart Embry.  http://www.slug.louisville.edu/~dsembr01/

    ``I am more pedantic than that of which you are of more pedantic than!''
	-- Matt McIrvin, in alt.religion.kibology, 1 May 1997
? fvwm/fvwm/activecolorset.fore.patch
Index: fvwm/ChangeLog
===================================================================
RCS file: /home/cvs/fvwm/fvwm/ChangeLog,v
retrieving revision 1.870
diff -u -r1.870 ChangeLog
--- fvwm/ChangeLog	2000/02/14 17:03:54	1.870
+++ fvwm/ChangeLog	2000/02/14 19:24:55
@@ -1,3 +1,9 @@
+2000-02-14  Darren Stuart Embry  <[email-masked]>
+
+	* fvwm/menus.c (paint_item): when checking for MST_DO_HILIGHT(mr),
+	also check for MST_HAS_ACTIVE_CSET(mr).  Makes background color
+	from ActiveColorset actually show up.
+
 2000-02-14  Hippo
 
 	* fvwm/add_window.{c,h}: Simplified window creation calls,
Index: fvwm/fvwm/menus.c
===================================================================
RCS file: /home/cvs/fvwm/fvwm/fvwm/menus.c,v
retrieving revision 1.184
diff -u -r1.184 menus.c
--- fvwm/fvwm/menus.c	2000/02/09 13:15:12	1.184
+++ fvwm/fvwm/menus.c	2000/02/14 19:24:58
@@ -2943,7 +2943,8 @@
    ***************************************************************/
 
   /* Hilight or clear the background. */
-  if (is_item_selected && MST_DO_HILIGHT(mr))
+  if (is_item_selected && 
+      (MST_DO_HILIGHT(mr) || MST_HAS_ACTIVE_CSET(mr)))
   {
     /* Hilight the background. */
     if (MR_HILIGHT_WIDTH(mr) - 2 * relief_thickness > 0)
@@ -2957,7 +2958,8 @@
     }
   }
   else if (MI_WAS_DESELECTED(mi) &&
-	   (relief_thickness > 0 || MST_DO_HILIGHT(mr)) &&
+	   (relief_thickness > 0 || MST_DO_HILIGHT(mr)
+	    || MST_HAS_ACTIVE_CSET(mr)) &&
 	   (MST_FACE(mr).type != GradientMenu || MST_HAS_MENU_CSET(mr)))
   {
     int d = 0;

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 15 Feb 2000 09:53:30 +0100

> MST_HAS_ACTIVE_CSET(mr) is set.

As I already replied in private:  The current behaviour is
100% correct.  If you want background hilighting, use the
HilighBack menu style.  I removed said code line explicitly
when I discovered that it breaks compatibility with the old
way.

Bye

Dominik ^_^

-- 
Dominik Vogt, Agilent Technologies, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/464-4596, fax: 07031/464-3883, [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]