A quick note, I attack to this mail all the patches, on it's latest
version. 

Forgive me for the numbering scheme. It intended to serve a purpose,
but since I added the changelogs on a different order and they are
cumulative, you'd likely get some annoying rejects if you use the
numbering on the file names. The correct order to avoid rejects is
this one, from the first to the last:

03-Conditionals-r3.patch
04-FlatSeparators-r2.patch
10-ButtonWidth-r1.patch
06-InactiveFont-r1.patch
02-ResizeOutlineThin-r1.patch

I am very sorry for the inconvenience.

If any of this is useful and tidy enough for it to be merged, that'd be
great.

All the patches include NEWS, Changelog, documentation and, when relevant,
the matching mods into test/*. If any of them lacks something, just let
me know and I will add it.
-- 
Jesús Guerrero <[EMAIL PROTECTED]>
diff -U3 -r fvwm/ChangeLog fvwm-/ChangeLog
--- fvwm/ChangeLog	2008-03-07 07:19:18.000000000 +0100
+++ fvwm-/ChangeLog	2008-03-07 07:19:42.000000000 +0100
@@ -38,6 +38,16 @@
 	*fvwm/borders.c
 	patched to add new Style: InactiveFont
 
+	*fvwm/style.c
+	*fvwm/style.h
+	*fvwm/move_resize.c
+	*fvwm/fvwm.h
+	*fvwm/window_flags.h
+	patched to add new style: ResizeOutlineThin
+
+	*fvwm/doc/commands/Style.xml
+	added documentation for Style ResizeOutlineThin
+
 2008-02-29  Viktor Griph  <griph(at)dd(dot)chalmers(dot)se>
 
 	* fvwm/add_window.c (setup_frame_window):
diff -U3 -r fvwm/doc/commands/Style.xml fvwm-/doc/commands/Style.xml
--- fvwm/doc/commands/Style.xml	2008-03-07 07:19:18.000000000 +0100
+++ fvwm-/doc/commands/Style.xml	2008-03-07 07:19:42.000000000 +0100
@@ -180,6 +180,7 @@
 <emphasis remap='I'>MaxWindowSize</emphasis>,
 <emphasis remap='I'>IconifyWindowGroups</emphasis> / <emphasis remap='I'>IconifyWindowGroupsOff</emphasis>,
 <emphasis remap='I'>ResizeOpaque</emphasis> / <emphasis remap='I'>ResizeOutline</emphasis>,
+<emphasis remap='I'>ResizeOutlineThin</emphasis>,
 <emphasis remap='I'>BackingStore</emphasis> / <emphasis remap='I'>BackingStoreOff</emphasis> / <emphasis remap='I'>BackingStoreWindowDefault</emphasis>,
 <emphasis remap='I'>Opacity</emphasis> / <emphasis remap='I'>ParentalRelativity</emphasis>,
 <emphasis remap='I'>SaveUnder</emphasis> / <emphasis remap='I'>SaveUnderOff</emphasis>,
@@ -1078,6 +1079,10 @@
 Style emacs ResizeOutline
 </programlisting>
 
+<para><fvwmopt cmd="Style" opt="ResizeOutlineThin"/>
+changes the move/resize box into a single one pixel rectangle. This
+is closer to how many other WMs look.</para>
+
 <para><fvwmopt cmd="Style" opt="Sticky"/>
 makes the window sticky, i.e. it is always visible on each page
 and each desk.  The opposite style,
diff -U3 -r fvwm/fvwm/fvwm.h fvwm-/fvwm/fvwm.h
--- fvwm/fvwm/fvwm.h	2008-03-07 07:19:18.000000000 +0100
+++ fvwm-/fvwm/fvwm.h	2008-03-07 07:19:42.000000000 +0100
@@ -224,6 +224,7 @@
 		unsigned do_not_show_on_map : 1;
 		unsigned do_raise_transient : 1;
 		unsigned do_resize_opaque : 1;
+		unsigned do_resize_outline_thin : 1;
 		unsigned do_shrink_windowshade : 1;
 		unsigned do_stack_transient_parent : 1;
 		unsigned do_window_list_skip : 1;
diff -U3 -r fvwm/fvwm/move_resize.c fvwm-/fvwm/move_resize.c
--- fvwm/fvwm/move_resize.c	2008-03-07 07:19:18.000000000 +0100
+++ fvwm-/fvwm/move_resize.c	2008-03-07 07:19:42.000000000 +0100
@@ -108,7 +108,7 @@
 
 extern Window PressedW;
 
-static void draw_move_resize_grid(int x, int  y, int  width, int height);
+static void draw_move_resize_grid(int x, int  y, int  width, int height, Bool thin);
 
 /* ----- end of resize globals ----- */
 
@@ -126,26 +126,33 @@
  *
  */
 static int get_outline_rects(
-	XRectangle *rects, int x, int y, int width, int height)
+	XRectangle *rects, int x, int y, int width, int height, Bool do_outline_thin)
 {
 	int i;
 	int n;
 	int m;
 
-	n = 3;
-	m = (width - 5) / 2;
-	if (m < n)
+	if (do_outline_thin)
 	{
-		n = m;
-	}
-	m = (height - 5) / 2;
-	if (m < n)
-	{
-		n = m;
+		n = 1;
 	}
-	if (n < 1)
+	else
 	{
-		n = 1;
+		n = 3;
+		m = (width - 5) / 2;
+		if (m < n)
+		{
+			n = m;
+		}
+		m = (height - 5) / 2;
+		if (m < n)
+		{
+			n = m;
+		}
+		if (n < 1)
+		{
+			n = 1;
+		}
 	}
 
 	for (i = 0; i < n; i++)
@@ -155,25 +162,28 @@
 		rects[i].width = width - (i << 1);
 		rects[i].height = height - (i << 1);
 	}
-	if (width - (n << 1) >= 5 && height - (n << 1) >= 5)
+	if (!do_outline_thin)
 	{
-		if (width - (n << 1) >= 10)
+		if (width - (n << 1) >= 5 && height - (n << 1) >= 5)
 		{
-			int off = (width - (n << 1)) / 3 + n;
-			rects[i].x = x + off;
-			rects[i].y = y + n;
-			rects[i].width = width - (off << 1);
-			rects[i].height = height - (n << 1);
-			i++;
-		}
-		if (height - (n << 1) >= 10)
-		{
-			int off = (height - (n << 1)) / 3 + n;
-			rects[i].x = x + n;
-			rects[i].y = y + off;
-			rects[i].width = width - (n << 1);
-			rects[i].height = height - (off << 1);
-			i++;
+			if (width - (n << 1) >= 10)
+			{
+				int off = (width - (n << 1)) / 3 + n;
+				rects[i].x = x + off;
+				rects[i].y = y + n;
+				rects[i].width = width - (off << 1);
+				rects[i].height = height - (n << 1);
+				i++;
+			}
+			if (height - (n << 1) >= 10)
+			{
+				int off = (height - (n << 1)) / 3 + n;
+				rects[i].x = x + n;
+				rects[i].y = y + off;
+				rects[i].width = width - (n << 1);
+				rects[i].height = height - (off << 1);
+				i++;
+			}
 		}
 	}
 
@@ -186,14 +196,15 @@
 	struct
 	{
 		unsigned is_enabled : 1;
+		unsigned do_outline_thin : 1;
 	} flags;
 } move_resize_grid =
 {
 	{ 0, 0, 0, 0 },
-	{ 0 }
+	{ 0, 0 }
 };
 
-static void draw_move_resize_grid(int x, int  y, int  width, int height)
+static void draw_move_resize_grid(int x, int  y, int  width, int height, Bool do_outline_thin)
 {
 	int nrects = 0;
 	XRectangle rects[10];
@@ -202,7 +213,8 @@
 	    x == move_resize_grid.geom.x &&
 	    y == move_resize_grid.geom.y &&
 	    width == move_resize_grid.geom.width &&
-	    height == move_resize_grid.geom.height)
+	    height == move_resize_grid.geom.height &&
+		do_outline_thin == move_resize_grid.flags.do_outline_thin)
 	{
 		return;
 	}
@@ -220,7 +232,8 @@
 				&(rects[0]), move_resize_grid.geom.x,
 				move_resize_grid.geom.y,
 				move_resize_grid.geom.width,
-				move_resize_grid.geom.height);
+				move_resize_grid.geom.height,
+				move_resize_grid.flags.do_outline_thin);
 	}
 	if (width && height)
 	{
@@ -229,8 +242,9 @@
 		move_resize_grid.geom.y = y;
 		move_resize_grid.geom.width = width;
 		move_resize_grid.geom.height = height;
+		move_resize_grid.flags.do_outline_thin = do_outline_thin;
 		nrects += get_outline_rects(
-			&(rects[nrects]), x, y, width, height);
+			&(rects[nrects]), x, y, width, height, do_outline_thin);
 	}
 	if (nrects > 0)
 	{
@@ -247,7 +261,7 @@
 	{
 		if (move_resize_grid.flags.is_enabled)
 		{
-			draw_move_resize_grid(0, 0, 0, 0);
+			draw_move_resize_grid(0, 0, 0, 0, 0);
 		}
 		else
 		{
@@ -255,6 +269,7 @@
 			move_resize_grid.geom.y = 0;
 			move_resize_grid.geom.width = 0;
 			move_resize_grid.geom.height = 0;
+			move_resize_grid.flags.do_outline_thin = 0;
 		}
 	}
 	else if (!move_resize_grid.flags.is_enabled)
@@ -266,7 +281,8 @@
 				move_resize_grid.geom.x,
 				move_resize_grid.geom.y,
 				move_resize_grid.geom.width,
-				move_resize_grid.geom.height);
+				move_resize_grid.geom.height,
+				move_resize_grid.flags.do_outline_thin);
 		}
 	}
 
@@ -2297,6 +2313,7 @@
 	/* Must not set placed by button if the event is a modified KeyEvent */
 	Bool is_fake_event;
 	FvwmWindow *fw = exc->w.fw;
+	Bool do_outline_thin = DO_RESIZE_OUTLINE_THIN(fw);
 	unsigned int draw_parts = PART_NONE;
 	XEvent e;
 
@@ -2370,7 +2387,7 @@
 	if (!IS_ICONIFIED(fw) &&
 	    ((!do_move_opaque && !Scr.gs.do_emulate_mwm) || !IS_MAPPED(fw)))
 	{
-		draw_move_resize_grid(xl, yt, Width - 1, Height - 1);
+		draw_move_resize_grid(xl, yt, Width - 1, Height - 1, do_outline_thin);
 	}
 
 	if (move_w == FW_W_FRAME(fw) && do_move_opaque)
@@ -2698,7 +2715,7 @@
 				if (!do_move_opaque)
 				{
 					draw_move_resize_grid(
-						xl, yt, Width - 1, Height - 1);
+						xl, yt, Width - 1, Height - 1, do_outline_thin);
 				}
 				else
 				{
@@ -2770,7 +2787,7 @@
 			if (!do_move_opaque)
 			{
 				draw_move_resize_grid(
-					xl, yt, Width - 1, Height - 1);
+					xl, yt, Width - 1, Height - 1, do_outline_thin);
 			}
 			break;
 
@@ -3252,7 +3269,7 @@
 static void __resize_step(
 	const exec_context_t *exc, int x_root, int y_root, int *x_off,
 	int *y_off, rectangle *drag, const rectangle *orig, int *xmotionp,
-	int *ymotionp, Bool do_resize_opaque, Bool is_direction_fixed)
+	int *ymotionp, Bool do_resize_opaque, Bool is_direction_fixed, Bool do_outline_thin)
 {
 	int action = 0;
 	XEvent e;
@@ -3375,7 +3392,7 @@
 		{
 			draw_move_resize_grid(
 				drag->x, drag->y, drag->width - 1,
-				drag->height - 1);
+				drag->height - 1, do_outline_thin);
 		}
 		else
 		{
@@ -3435,6 +3452,7 @@
 	int x_off;
 	int y_off;
 	direction_t dir;
+	Bool do_outline_thin = DO_RESIZE_OUTLINE_THIN(fw);
 
 	bad_window = False;
 	ResizeWindow = FW_W_FRAME(fw);
@@ -3738,7 +3756,7 @@
 	if (!do_resize_opaque)
 	{
 		draw_move_resize_grid(
-			drag->x, drag->y, drag->width - 1, drag->height - 1);
+			drag->x, drag->y, drag->width - 1, drag->height - 1, do_outline_thin);
 	}
 	/* kick off resizing without requiring any motion if invoked with a key
 	 * press */
@@ -3759,7 +3777,7 @@
 		yo = 0;
 		__resize_step(
 			exc, stashed_x, stashed_y, &xo, &yo, drag, orig,
-			&xmotion, &ymotion, do_resize_opaque, True);
+			&xmotion, &ymotion, do_resize_opaque, True, do_outline_thin);
 	}
 	else
 	{
@@ -3923,7 +3941,7 @@
 				__resize_step(
 					exc, x, y, &x_off, &y_off, drag, orig,
 					&xmotion, &ymotion, do_resize_opaque,
-					is_direction_fixed);
+					is_direction_fixed, do_outline_thin);
 				/* need to move the viewport */
 				HandlePaging(
 					&ev, dx, dy, &x, &y, &delta_x,
@@ -3941,7 +3959,7 @@
 				__resize_step(
 					exc, x, y, &x_off, &y_off, drag, orig,
 					&xmotion, &ymotion, do_resize_opaque,
-					is_direction_fixed);
+					is_direction_fixed, do_outline_thin);
 			}
 			fForceRedraw = False;
 			is_done = True;
@@ -3976,7 +3994,7 @@
 			{
 				draw_move_resize_grid(
 					drag->x, drag->y, drag->width - 1,
-					drag->height - 1);
+					drag->height - 1, do_outline_thin);
 			}
 		}
 		else
@@ -4029,7 +4047,7 @@
 			g = sorig;
 			__resize_step(
 				exc, sorig.x, sorig.y, &xo, &yo, &g, orig,
-				&xmotion, &ymotion, do_resize_opaque, True);
+				&xmotion, &ymotion, do_resize_opaque, True, do_outline_thin);
 		}
 		if (vx != Scr.Vx || vy != Scr.Vy)
 		{
diff -U3 -r fvwm/fvwm/style.c fvwm-/fvwm/style.c
--- fvwm/fvwm/style.c	2008-03-07 07:19:18.000000000 +0100
+++ fvwm-/fvwm/style.c	2008-03-07 07:19:42.000000000 +0100
@@ -3651,6 +3651,12 @@
 			S_SET_DO_RESIZE_OPAQUE(SCM(*ps), 1);
 			S_SET_DO_RESIZE_OPAQUE(SCC(*ps), 1);
 		}
+		else if (StrEquals(token, "ResizeOutlineThin"))
+		{
+			S_SET_DO_RESIZE_OUTLINE_THIN(SCF(*ps), on);
+			S_SET_DO_RESIZE_OUTLINE_THIN(SCM(*ps), 1);
+			S_SET_DO_RESIZE_OUTLINE_THIN(SCC(*ps), 1);
+		}
 		else if (StrEquals(token, "RightTitleRotatedCW"))
 		{
 			S_SET_IS_RIGHT_TITLE_ROTATED_CW(SCF(*ps), on);
diff -U3 -r fvwm/fvwm/style.h fvwm-/fvwm/style.h
--- fvwm/fvwm/style.h	2008-03-07 07:19:18.000000000 +0100
+++ fvwm-/fvwm/style.h	2008-03-07 07:19:42.000000000 +0100
@@ -203,6 +203,10 @@
 	((c).s.do_resize_opaque)
 #define S_SET_DO_RESIZE_OPAQUE(c,x) \
 	((c).s.do_resize_opaque = !!(x))
+#define S_DO_RESIZE_OUTLINE_THIN(c) \
+	((c).s.do_resize_outline_thin)
+#define S_SET_DO_RESIZE_OUTLINE_THIN(c,x) \
+	((c).s.do_resize_outline_thin = !!(x))
 #define S_DO_SHRINK_WINDOWSHADE(c) \
 	((c).s.do_shrink_windowshade)
 #define S_SET_DO_SHRINK_WINDOWSHADE(c,x) \
diff -U3 -r fvwm/fvwm/window_flags.h fvwm-/fvwm/window_flags.h
--- fvwm/fvwm/window_flags.h	2008-03-07 07:19:18.000000000 +0100
+++ fvwm-/fvwm/window_flags.h	2008-03-07 07:19:42.000000000 +0100
@@ -21,6 +21,8 @@
 	((fw)->flags.common.s.do_raise_transient)
 #define DO_RESIZE_OPAQUE(fw) \
 	((fw)->flags.common.s.do_resize_opaque)
+#define DO_RESIZE_OUTLINE_THIN(fw) \
+	((fw)->flags.common.s.do_resize_outline_thin)
 #define DO_SHRINK_WINDOWSHADE(fw) \
 	((fw)->flags.common.s.do_shrink_windowshade)
 #define SET_DO_SHRINK_WINDOWSHADE(fw,x) \
diff -U3 -r fvwm/NEWS fvwm-/NEWS
--- fvwm/NEWS	2008-03-07 07:19:18.000000000 +0100
+++ fvwm-/NEWS	2008-03-07 07:19:42.000000000 +0100
@@ -12,6 +12,7 @@
    - Added new menu separator menustyle: FlatSeparator
    - Added new titlestyle: ButtonWidth
    - Added new style: InactiveFont
+   - Added new style: ResizeOutlineThin
 
 * Bug fixes:
 
diff -U3 -r fvwm/tests/purify/purify.fvwm2rc fvwm-/tests/purify/purify.fvwm2rc
--- fvwm/tests/purify/purify.fvwm2rc	2008-03-07 07:19:18.000000000 +0100
+++ fvwm-/tests/purify/purify.fvwm2rc	2008-03-07 07:20:19.000000000 +0100
@@ -1853,6 +1853,7 @@
  + I StyleAndUpdate "window*" IconifyWindowGroupsOff
  + I StyleAndUpdate "window*" ResizeOpaque
  + I StyleAndUpdate "window*" ResizeOutline
+ + I StyleAndUpdate "window*" ResizeOutlineThin
  + I StyleAndUpdate "window*" BackingStore
  + I StyleAndUpdate "window*" BackingStoreOff
  + I StyleAndUpdate "window*" BackingStoreWindowDefault
diff -U5 -r fvwm/ChangeLog fvwm/ChangeLog
--- fvwm/ChangeLog	2008-03-04 01:09:54.000000000 +0100
+++ fvwm/ChangeLog	2008-03-07 01:33:47.000000000 +0100
@@ -1,5 +1,13 @@
+2008-03-07  Jesús Guerrero  <i92guboj(at)terra(dot)es>
+
+	* fvwm/contitionals.c (CreateConditionMask):
+	add some conditional masks: HasTitle, HasBorders,
+		TitleAtBottom, TitleAtTop, TitleAtLeft,	TitleAtRight
+	* doc/fvwm/conditionals.xml
+	documentation for the new conditions
+
 2008-02-29  Viktor Griph  <griph(at)dd(dot)chalmers(dot)se>
 
 	* fvwm/add_window.c (setup_frame_window):
 	fix core dump with ARGB detection code
 	fix compilation without XRender
diff -U5 -r fvwm/doc/fvwm/conditionals.xml fvwm/doc/fvwm/conditionals.xml
--- fvwm/doc/fvwm/conditionals.xml	2007-08-07 00:24:03.000000000 +0200
+++ fvwm/doc/fvwm/conditionals.xml	2008-03-07 01:33:06.000000000 +0100
@@ -187,11 +187,17 @@
 <emphasis remap='I'>StickyAcrossPages</emphasis>,
 <emphasis remap='I'>StickyIcon</emphasis>,
 <emphasis remap='I'>StickyAcrossDesksIcon</emphasis>,
 <emphasis remap='I'>StickyAcrossPagesIcon</emphasis>,
 <emphasis remap='I'>Transient</emphasis>,
-<emphasis remap='I'>Visible</emphasis>.</para>
+<emphasis remap='I'>Visible</emphasis>,
+<emphasis remap='I'>HasTitle</emphasis>,
+<emphasis remap='I'>HasBorders</emphasis>,
+<emphasis remap='I'>TitleAtBottom</emphasis>,
+<emphasis remap='I'>TitleAtTop</emphasis>,
+<emphasis remap='I'>TitleAtLeft</emphasis>,
+<emphasis remap='I'>TitleAtRight</emphasis>.</para>
 
 <para>The
 <emphasis remap='I'>AcceptsFocus</emphasis>
 condition excludes all windows that do not want the input focus
 (the application has set the "Input hints" for the window to
@@ -454,10 +460,23 @@
 <emphasis remap='I'>Visible</emphasis>
 condition matches only windows that are at least partially
 visible on the current viewport and not completely overlapped by
 other windows.</para>
 
+<para>The
+<emphasis remap='I'>HasTitle</emphasis>
+condition matches only windows that have a title bar.</para>
+
+<para>The
+<emphasis remap='I'>HasBorders</emphasis>
+condition matches only windows that have borders.</para>
+
+<para>The
+<emphasis remap='I'>TitleAtBottom</emphasis>, <emphasis remap='I'>TitleAtTop</emphasis>, <emphasis remap='I'>TitleAtLeft</emphasis>, <emphasis remap='I'>TitleAtRight</emphasis>, 
+conditions matches respectively only windows that have a title
+bar, and have it on the specified location.</para>
+
 </section>
 
 
 
 </section>
diff -U5 -r fvwm/fvwm/conditional.c fvwm/fvwm/conditional.c
--- fvwm/fvwm/conditional.c	2007-10-06 11:17:09.000000000 +0200
+++ fvwm/fvwm/conditional.c	2008-03-07 01:10:54.000000000 +0100
@@ -598,10 +598,40 @@
 		else if (StrEquals(cond,"HasHandles"))
 		{
 			SET_HAS_HANDLES(mask, on);
 			SETM_HAS_HANDLES(mask, 1);
 		}
+		else if (StrEquals(cond, "HasTitle"))
+		{
+			SET_HAS_TITLE(mask, on);
+			SETM_HAS_TITLE(mask, 1);
+		}
+		else if (StrEquals(cond, "HasBorders"))
+		{
+			SET_HAS_NO_BORDER(mask, !on);
+			SETM_HAS_NO_BORDER(mask, 1);
+		}
+		else if (StrEquals(cond, "TitleAtBottom"))
+		{
+			SET_TITLE_DIR(mask, DIR_S);
+			SETM_TITLE_DIR(mask, 1);
+		}
+		else if (StrEquals(cond, "TitleAtTop"))
+		{
+			SET_TITLE_DIR(mask, DIR_N);
+			SETM_TITLE_DIR(mask, 1);
+		}
+		else if (StrEquals(cond, "TitleAtLeft"))
+		{
+			SET_TITLE_DIR(mask, DIR_W);
+			SETM_TITLE_DIR(mask, 1);
+		}
+		else if (StrEquals(cond, "TitleAtRight"))
+		{
+			SET_TITLE_DIR(mask, DIR_E);
+			SETM_TITLE_DIR(mask, 1);
+		}
 		else if (StrEquals(cond,"Iconifiable"))
 		{
 			SET_IS_UNICONIFIABLE(mask, !on);
 			SETM_IS_UNICONIFIABLE(mask, 1);
 		}
diff -U5 -r fvwm/NEWS fvwm/NEWS
--- fvwm/NEWS	2008-03-04 01:09:54.000000000 +0100
+++ fvwm/NEWS	2008-03-07 01:50:47.000000000 +0100
@@ -3,10 +3,15 @@
 
 -------------------------------------------------------------------
 
 Changes in beta release 2.5.26 (not released yet)
 
+* New features:
+
+   - Added new condition masks: HasTitle, HasBorders,
+     TitleAtBottom, TitleAtTop, TitleAtLeft, TitleAtRight
+
 * Bug fixes:
 
    - Fix crash in ARGB visual detection code
    - Fix compilation without XRender support
 
diff -U5 -r fvwm/tests/purify/purify.fvwm2rc fvwm/tests/purify/purify.fvwm2rc
--- fvwm/tests/purify/purify.fvwm2rc	2004-05-30 16:05:49.000000000 +0200
+++ fvwm/tests/purify/purify.fvwm2rc	2008-03-07 03:07:22.000000000 +0100
@@ -2826,10 +2826,22 @@
  + I CurrentEchoFunc !CurrentGlobalPage
  + I CurrentEchoFunc CurrentPageAnyDesk
  + I CurrentEchoFunc !CurrentPageAnyDesk
  + I CurrentEchoFunc CurrentGlobalPageAnyDesk
  + I CurrentEchoFunc !CurrentGlobalPageAnyDesk
+ + I CurrentEchoFunc HasTitle
+ + I CurrentEchoFunc !HasTitle
+ + I CurrentEchoFunc HasBorders
+ + I CurrentEchoFunc !HasBorders
+ + I CurrentEchoFunc TitleAtBottom
+ + I CurrentEchoFunc !TitleAtBottom
+ + I CurrentEchoFunc TitleAtTop
+ + I CurrentEchoFunc !TitleAtTop
+ + I CurrentEchoFunc TitleAtLeft
+ + I CurrentEchoFunc !TitleAtLeft
+ + I CurrentEchoFunc TitleAtRight
+ + I CurrentEchoFunc !TitleAtRight
 # All test
  + I CurrentEchoFunc * \
  !* \
  window* \
  window6 \
@@ -2893,11 +2905,23 @@
  CurrentGlobalPage \
  !CurrentGlobalPage \
  CurrentPageAnyDesk \
  !CurrentPageAnyDesk \
  CurrentGlobalPageAnyDesk \
- !CurrentGlobalPageAnyDesk
+ !CurrentGlobalPageAnyDesk \
+ HasTitle \
+ !HasTitle \
+ HasBorders \
+ !HasBorders \
+ TitleAtBottom \
+ !TitleAtBottom \
+ TitleAtTop \
+ !TitleAtTop \
+ TitleAtLeft \
+ !TitleAtLeft \
+ TitleAtRight \
+ !TitleAtRight
 
 DestroyFunc DirectionEchoFunc
 AddToFunc DirectionEchoFunc
 + I Direction $* Nop
 + I KeepRc TestRc (Match) Echo Direction ($*) Match
diff -U5 -r fvwm/doc/commands/MenuStyle.xml fvwm/doc/commands/MenuStyle.xml
--- fvwm/doc/commands/MenuStyle.xml	2007-08-18 00:36:49.000000000 +0200
+++ fvwm/doc/commands/MenuStyle.xml	2008-03-07 03:24:46.000000000 +0100
@@ -56,11 +56,11 @@
 MenuFace,
 PopupDelay,
 PopupOffset,
 TitleWarp / !TitleWarp,
 TitleUnderlines0 / TitleUnderlines1 / TitleUnderlines2,
-SeparatorsLong / SeparatorsShort,
+SeparatorsLong / SeparatorsShort / FlatSeparators,
 TrianglesSolid / TrianglesRelief,
 PopupImmediately / PopupDelayed,
 PopdownImmediately / PopdownDelayed,
 PopupActiveArea,
 DoubleClickTime,
@@ -429,10 +429,15 @@
 set the length of menu separators.  Long separators run from the
 left edge all the way to the right edge.  Short separators leave a
 few pixels to the edges of the menu.</para>
 
 <para>
+<fvwmopt cmd="MenuStyle" opt="FlatSeparators"/>
+changes the separators so that they are a single pixel thick and
+colored the same as the text.</para>
+
+<para>
 <fvwmopt cmd="MenuStyle" opt="TrianglesSolid"/> and
 <fvwmopt cmd="MenuStyle" opt="TrianglesRelief"/>
 affect how the small triangles for sub menus is drawn.  Solid
 triangles are filled with a color while relief triangles are
 hollow.</para>
diff -U5 -r fvwm/fvwm/menuitem.c fvwm/fvwm/menuitem.c
--- fvwm/fvwm/menuitem.c	2007-07-26 10:00:43.000000000 +0200
+++ fvwm/fvwm/menuitem.c	2008-03-07 03:18:49.000000000 +0100
@@ -80,14 +80,22 @@
  *
  *  Draws two horizontal lines to form a separator
  *
  */
 static void draw_separator(
-	Window w, GC TopGC, GC BottomGC, int x1, int y, int x2)
+	Window w, GC TopGC, GC BottomGC, GC ForeGC, int x1, int y, int x2,
+	Bool do_flat_separators)
 {
-	XDrawLine(dpy, w, TopGC   , x1,   y,   x2,   y);
-	XDrawLine(dpy, w, BottomGC, x1-1, y+1, x2+1, y+1);
+   if (do_flat_separators)
+   {
+       XDrawLine(dpy, w, ForeGC, x1, y, x2, y);
+   }
+   else
+   {
+       XDrawLine(dpy, w, TopGC   , x1,   y,   x2,   y);
+       XDrawLine(dpy, w, BottomGC, x1-1, y+1, x2+1, y+1);
+   }
 
 	return;
 }
 
 /*
@@ -380,10 +388,11 @@
 	int off_cs;
 	FvwmRenderAttributes fra;
 	/*Pixel fg, fgsh;*/
 	int relief_thickness = ST_RELIEF_THICKNESS(ms);
 	Bool is_item_selected;
+	Bool do_flat_separators;
 	Bool item_cleared = False;
 	Bool xft_clear = False;
 	Bool empty_inter = False;
 	XRectangle b;
 	Region region = None;
@@ -598,10 +607,12 @@
 
 	/*
 	 * Draw the item itself.
 	 */
 
+	do_flat_separators = ST_DO_FLAT_SEPARATOR(ms);
+	
 	/* Calculate the separator offsets. */
 	if (ST_HAS_LONG_SEPARATORS(ms))
 	{
 		sx1 = MDIM_ITEM_X_OFFSET(*dim) + relief_thickness;
 		sx2 = MDIM_ITEM_X_OFFSET(*dim) + MDIM_ITEM_WIDTH(*dim) - 1 -
@@ -618,13 +629,13 @@
 	{
 		if (sx1 < sx2)
 		{
 			/* It's a separator. */
 			draw_separator(
-				mpip->w, gcs.shadow_gc, gcs.hilight_gc, sx1,
-				y_offset + y_height - MENU_SEPARATOR_HEIGHT,
-				sx2);
+				mpip->w, gcs.shadow_gc, gcs.hilight_gc, gcs.fore_gc,
+				sx1, y_offset + y_height - MENU_SEPARATOR_HEIGHT,
+				sx2, do_flat_separators);
 			/* Nothing else to do. */
 		}
 		return;
 	}
 	else if (MI_IS_TEAR_OFF_BAR(mi))
@@ -660,12 +671,12 @@
 			text_y += MENU_SEPARATOR_HEIGHT + add;
 			y = y_offset + add;
 			if (sx1 < sx2)
 			{
 				draw_separator(
-					mpip->w, gcs.shadow_gc, gcs.hilight_gc,
-					sx1, y, sx2);
+					mpip->w, gcs.shadow_gc, gcs.hilight_gc, gcs.fore_gc,
+					sx1, y, sx2, do_flat_separators);
 			}
 		}
 		/* Underline the title. */
 		switch (ST_TITLE_UNDERLINES(ms))
 		{
@@ -674,12 +685,12 @@
 		case 1:
 			if (MI_NEXT_ITEM(mi) != NULL)
 			{
 				y = y_offset + y_height - MENU_SEPARATOR_HEIGHT;
 				draw_separator(
-					mpip->w, gcs.shadow_gc, gcs.hilight_gc,
-					sx1, y, sx2);
+					mpip->w, gcs.shadow_gc, gcs.hilight_gc, gcs.fore_gc,
+					sx1, y, sx2, do_flat_separators);
 			}
 			break;
 		default:
 			for (i = ST_TITLE_UNDERLINES(ms); i-- > 0; )
 			{
diff -U5 -r fvwm/fvwm/menus.c fvwm/fvwm/menus.c
--- fvwm/fvwm/menus.c	2007-11-23 11:12:54.000000000 +0100
+++ fvwm/fvwm/menus.c	2008-03-07 03:18:49.000000000 +0100
@@ -1601,10 +1601,14 @@
 		int separator_height;
 
 		separator_height = (last_item_has_relief) ?
 			MENU_SEPARATOR_HEIGHT + relief_thickness :
 			MENU_SEPARATOR_TOTAL_HEIGHT;
+		if (MST_DO_FLAT_SEPARATOR(msp->menu))
+		{
+			separator_height += 1;
+		}
 		MI_Y_OFFSET(mi) = y;
 		if (MI_IS_TITLE(mi))
 		{
 			MI_HEIGHT(mi) = MST_PTITLEFONT(msp->menu)->height +
 				MST_TITLE_GAP_ABOVE(msp->menu) +
diff -U5 -r fvwm/fvwm/menustyle.c fvwm/fvwm/menustyle.c
--- fvwm/fvwm/menustyle.c	2007-08-07 22:17:43.000000000 +0200
+++ fvwm/fvwm/menustyle.c	2008-03-07 03:18:49.000000000 +0100
@@ -403,11 +403,11 @@
 		"PopupActiveArea",
 		"PopupIgnore", "PopupClose",
 		"MouseWheel", "ScrollOffPage",
 		"TrianglesUseFore",
 		"TitleColorset", "HilightTitleBack",
-		"TitleFont",
+		"TitleFont", "FlatSeparators",
 		NULL
 	};
 
 	return GetTokenIndex(option, optlist, 0, NULL);
 }
@@ -878,10 +878,11 @@
 			ST_POPDOWN_DELAY(tmpms) = DEFAULT_POPDOWN_DELAY;
 			ST_MOUSE_WHEEL(tmpms) = MMW_POINTER;
 			ST_SCROLL_OFF_PAGE(tmpms) = 1;
 			ST_DO_HILIGHT_TITLE_BACK(tmpms) = 0;
 			ST_USING_DEFAULT_TITLEFONT(tmpms) = True;
+			ST_DO_FLAT_SEPARATOR(tmpms) = 0;
 			has_gc_changed = True;
 			option = "fvwm";
 		}
 		else
 		{
@@ -1565,11 +1566,13 @@
 				ST_PTITLEFONT(tmpms) = new_font;
 				ST_USING_DEFAULT_TITLEFONT(tmpms) = False;
 			}
 			has_gc_changed = True;
 			break;
-
+		case 62: /* FlatSeparators */
+			ST_DO_FLAT_SEPARATOR(tmpms) = on;
+			break;
 
 #if 0
 		case 99: /* PositionHints */
 			/* to be implemented */
 			break;
@@ -1819,10 +1822,12 @@
 	ST_SCROLL_OFF_PAGE(destms) = ST_SCROLL_OFF_PAGE(origms);
 	/* TrianglesUseFore */
 	ST_TRIANGLES_USE_FORE(destms) = ST_TRIANGLES_USE_FORE(origms);
 	/* Title */
 	ST_DO_HILIGHT_TITLE_BACK(destms) = ST_DO_HILIGHT_TITLE_BACK(origms);
+	/* FlatSeparators */
+	ST_DO_FLAT_SEPARATOR(destms) = ST_DO_FLAT_SEPARATOR(origms);
 
 	menustyle_update(destms);
 
 	return;
 }
diff -U5 -r fvwm/fvwm/menustyle.h fvwm/fvwm/menustyle.h
--- fvwm/fvwm/menustyle.h	2007-01-13 16:07:14.000000000 +0100
+++ fvwm/fvwm/menustyle.h	2008-03-07 03:18:49.000000000 +0100
@@ -21,10 +21,12 @@
 /* look */
 #define ST_FACE(s)                    ((s)->look.face)
 #define MST_FACE(m)                   ((m)->s->ms->look.face)
 #define ST_DO_HILIGHT_BACK(s)         ((s)->look.flags.do_hilight_back)
 #define MST_DO_HILIGHT_BACK(m)        ((m)->s->ms->look.flags.do_hilight_back)
+#define ST_DO_FLAT_SEPARATOR(s)       ((s)->look.flags.do_flat_separator)
+#define MST_DO_FLAT_SEPARATOR(m)      ((m)->s->ms->look.flags.do_flat_separator)
 #define ST_DO_HILIGHT_FORE(s)         ((s)->look.flags.do_hilight_fore)
 #define MST_DO_HILIGHT_FORE(m)        ((m)->s->ms->look.flags.do_hilight_fore)
 #define ST_DO_HILIGHT_TITLE_BACK(s)   ((s)->look.flags.do_hilight_title_back)
 #define MST_DO_HILIGHT_TITLE_BACK(m)			\
 	((m)->s->ms->look.flags.do_hilight_title_back)
@@ -273,10 +275,11 @@
 		unsigned using_default_font : 1;
 		unsigned triangles_use_fore : 1;
 		unsigned has_title_cset : 1;
 		unsigned do_hilight_title_back : 1;
 		unsigned using_default_titlefont : 1;
+		unsigned do_flat_separator : 1;
 	} flags;
 	unsigned char ReliefThickness;
 	unsigned char TitleUnderlines;
 	unsigned char BorderWidth;
 	struct
diff -U5 -r fvwm/tests/menus/menus.read fvwm/tests/menus/menus.read
--- fvwm/tests/menus/menus.read	2001-07-21 21:29:27.000000000 +0200
+++ fvwm/tests/menus/menus.read	2008-03-07 03:31:28.000000000 +0100
@@ -6,11 +6,11 @@
 
 # Tested menu styles and parameters
 #
 # - SidePic
 # - SideColor
-# - SeparatorsLong / SeparatorsShort
+# - SeparatorsLong / SeparatorsShort / FlatSeparators
 # - TitleUnderlines0 / TitleUnderlines1 / TitleUnderlines2
 # - VerticalItemSpacing
 # - VerticalTitleSpacing
 # - BorderWidth
 # - Hilight3DThickness / Hilight3DThick / Hilight3DThin / Hilight3DOff
@@ -87,10 +87,13 @@
 UseDefaultItems
 DoTest
 NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", separatorsshort" "separatorsshort" "separatorsshort"
 UseDefaultItems
 DoTest
+NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", flatseparators" "flatseparators" "flatseparators"
+UseDefaultItems
+DoTest
 NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", titleunderlines0" "titleunderlines0" "titleunderlines0"
 UseDefaultItems
 DoTest
 NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", titleunderlines1" "titleunderlines1" "titleunderlines1"
 UseDefaultItems
diff -U5 -r fvwm/tests/menus/README fvwm/tests/menus/README
--- fvwm/tests/menus/README	2001-01-21 14:40:17.000000000 +0100
+++ fvwm/tests/menus/README	2008-03-07 03:32:57.000000000 +0100
@@ -17,11 +17,11 @@
 
 - Menu layout code.
 - MenuStyle options:
     SidePic
     SideColor
-    SeparatorsLong / SeparatorsShort
+    SeparatorsLong / SeparatorsShort / FlatSeparators
     TitleUnderlines0 / TitleUnderlines1 / TitleUnderlines2
     VerticalItemSpacing
     VerticalTitleSpacing
     BorderWidth
     Hilight3DThickness / Hilight3DThick / Hilight3DThin / Hilight3DOff
diff -U5 -r fvwm/tests/purify/purify.fvwm2rc fvwm/tests/purify/purify.fvwm2rc
--- fvwm/tests/purify/purify.fvwm2rc	2004-05-30 16:05:49.000000000 +0200
+++ fvwm/tests/purify/purify.fvwm2rc	2008-03-07 03:29:07.000000000 +0100
@@ -353,20 +353,20 @@
  + I MenuStyle FvwmStyle Fvwm, BorderWidth 10, Foreground black, Background Gray
  + I MenuStyle FvwmStyle Greyed blue,  HilightBack, ActiveFore, Hilight3DThick
  + I MenuStyle FvwmStyle Animation, Font "xft:monospace;9x15bold/iso8859-1"
  + I MenuStyle FvwmStyle PopupOffset 2 2, TitleWarp, DoubleClickTime 500
  + I MenuStyle FvwmStyle PopupImmediately, PopdownImmediately
- + I MenuStyle FvwmStyle TitleUnderlines0, SeparatorsLong, TrianglesSolid
- + I MenuStyle FvwmStyle AutomaticHotkeys, PopupAsRootMenu, RemoveSubmenus
+ + I MenuStyle FvwmStyle TitleUnderlines0, SeparatorsLong, TrianglesSolid, FlatSeparators
+ + I MenuStyle FvwmStyle AutomaticHotkeys, PopupAsRootMenu, RemoveSubmenus, !FlatSeparators
  + I MenuStyle FvwmStyle SubmenusRight, SelectOnRelease Alt, VerticalItemSpacing -2
 
  + I MenuStyle MwmStyle Mwm, HilightBackOff, ActiveForeOff, Hilight3DThin
  + I MenuStyle MwmStyle AnimationOff, PopupDelayed, PopupDelay 26, TitleWarpOff
  + I MenuStyle MwmStyle PopupDelayed, PopupDelay 26, DoubleClickTime
  + I MenuStyle MwmStyle PopdownDelayed, PopdownDelay 100
  + I MenuStyle MwmStyle Font -*-*-*-*-normal--*-160-75-75-m-50-iso8859-*
- + I MenuStyle MwmStyle TitleUnderlines1, SeparatorsShort, TrianglesRelief
+ + I MenuStyle MwmStyle TitleUnderlines1, SeparatorsShort, TrianglesRelief, FlatSeparators
  + I MenuStyle MwmStyle AutomaticHotkeysOff, PopupAsSubmenu, HoldSubmenus
  + I MenuStyle MwmStyle SubmenusLeft, VerticalTitleSpacing 5
 
  + I MenuStyle WinStyle MenuColorset 0, ActiveColorset 0, GreyedColorset 0
  + I MenuStyle WinStyle Hilight3DOff, PopupImmediately
--- fvwm/ChangeLog.orig	2008-03-07 04:57:04.000000000 +0100
+++ fvwm/ChangeLog	2008-03-07 04:58:49.000000000 +0100
@@ -1,13 +1,26 @@
 2008-03-07  Jesús Guerrero  <i92guboj(at)terra(dot)es>
 
 	* fvwm/contitionals.c (CreateConditionMask):
 	add some conditional masks: HasTitle, HasBorders,
 		TitleAtBottom, TitleAtTop, TitleAtLeft,	TitleAtRight
+
 	* doc/fvwm/conditionals.xml
 	documentation for the new conditions
 
+  *fvwm/fvwm/menuitem.c
+  *fvwm/fvwm/menus.c
+  *fvwm/fvwm/menustyle.c
+  *fvwm/fvwm/menustyle.h
+  *fvwm/tests/menus/menus.read
+  *fvwm/tests/menus/README
+  *fvwm/tests/purify/purify.fvwm2rc
+	new menustyle option: FlatSeparators
+
+  *fvwm/doc/commands/MenuStyle.xml
+	added the menustyle FlatSeparators documentation
+
 2008-02-29  Viktor Griph  <griph(at)dd(dot)chalmers(dot)se>
 
 	* fvwm/add_window.c (setup_frame_window):
 	fix core dump with ARGB detection code
 	fix compilation without XRender
--- fvwm/NEWS.orig	2008-03-07 05:04:27.000000000 +0100
+++ fvwm/NEWS	2008-03-07 05:04:35.000000000 +0100
@@ -7,10 +7,11 @@
 
 * New features:
 
    - Added new condition masks: HasTitle, HasBorders,
      TitleAtBottom, TitleAtTop, TitleAtLeft, TitleAtRight
+   - Added new menu separator menustyle: FlatSeparator
 
 * Bug fixes:
 
    - Fix crash in ARGB visual detection code
    - Fix compilation without XRender support
diff -r -U3 fvwm/ChangeLog fvwm/ChangeLog
--- fvwm/ChangeLog	2008-03-07 05:53:47.000000000 +0100
+++ fvwm/ChangeLog	2008-03-07 06:07:12.000000000 +0100
@@ -27,6 +27,17 @@
 	*fvwm/builtins.c
 	patched for ButtonWidth
 
+	*fvwm/doc/commands/Style.xml
+	added documentation for Style InactiveFont
+
+	*fvwm/style.c
+	*fvwm/style.h
+	*fvwm/fvwm.h
+	*fvwm/add_window.c
+	*fvwm/window_flags.h
+	*fvwm/borders.c
+	patched to add new Style: InactiveFont
+
 2008-02-29  Viktor Griph  <griph(at)dd(dot)chalmers(dot)se>
 
 	* fvwm/add_window.c (setup_frame_window):
diff -r -U3 fvwm/doc/commands/Style.xml fvwm/doc/commands/Style.xml
--- fvwm/doc/commands/Style.xml	2008-03-07 05:53:47.000000000 +0100
+++ fvwm/doc/commands/Style.xml	2008-03-07 06:04:49.000000000 +0100
@@ -84,6 +84,7 @@
 <emphasis remap='I'>IconBackgroundColorset</emphasis>,
 <emphasis remap='I'>IconTitleRelief</emphasis>, <emphasis remap='I'>IconBackgroundRelief</emphasis>, <emphasis remap='I'>IconBackgroundPadding</emphasis>,
 <emphasis remap='I'>Font</emphasis>,
+<emphasis remap='I'>InactiveFont</emphasis>,
 <emphasis remap='I'>IconFont</emphasis>,
 <emphasis remap='I'>StartsOnDesk</emphasis> / <emphasis remap='I'>StartsOnPage</emphasis> / <emphasis remap='I'>StartsAnyWhere</emphasis>,
 <emphasis remap='I'>StartsOnScreen</emphasis>,
@@ -606,13 +607,14 @@
 and it is restored if the argument is omitted.</para>
 
 <para>The
-<fvwmopt cmd="Style" opt="Font"/> and <fvwmopt cmd="Style" opt="IconFont"/>
+<fvwmopt cmd="Style" opt="Font"/>, <fvwmopt cmd="Style" opt="InactiveFont"/>
+and <fvwmopt cmd="Style" opt="IconFont"/>
 options take the name of a font as their sole argument. This font
-is used in the window or icon title.  By default the font given in
-the
+is used in the active window, inactive window or icon title respectively.
+By default the font given in the
 <fvwmref cmd="DefaultFont"/>
 command is used.  To revert back to the default, use the style
-without the name argument.  These styles replace the older
+without the name argument.  The first two styles replace the older
 <fvwmref cmd="WindowFont"/> and <fvwmopt cmd="Style" opt="IconFont"/>
 commands.</para>
 
diff -r -U3 fvwm/fvwm/add_window.c fvwm/fvwm/add_window.c
--- fvwm/fvwm/add_window.c	2008-03-07 05:53:47.000000000 +0100
+++ fvwm/fvwm/add_window.c	2008-03-07 05:58:46.000000000 +0100
@@ -638,6 +638,18 @@
 	fw->title_font = Scr.DefaultFont;
 	SET_USING_DEFAULT_WINDOW_FONT(fw, 1);
 
+	if (IS_INACTIVE_WINDOW_FONT_LOADED(fw) && !USING_DEFAULT_INACTIVE_WINDOW_FONT(fw) &&
+	    fw->title_font != Scr.DefaultFont)
+	{
+		FlocaleUnloadFont(dpy, fw->title_font);
+	}
+	SET_INACTIVE_WINDOW_FONT_LOADED(fw, 0);
+	/* Fall back to default font. There are some race conditions when a
+	 * window is destroyed and recaptured where an invalid font might be
+	 * accessed  otherwise. */
+	fw->title_font = Scr.DefaultFont;
+	SET_USING_DEFAULT_INACTIVE_WINDOW_FONT(fw, 1);
+	
 	return;
 }
 
@@ -1735,6 +1747,25 @@
 		}
 		SET_WINDOW_FONT_LOADED(fw, 1);
 	}
+	/* load inactive font */
+	if (!IS_INACTIVE_WINDOW_FONT_LOADED(fw))
+	{
+		if (S_HAS_INACTIVE_WINDOW_FONT(SCF(*pstyle)) &&
+		    SGET_INACTIVE_WINDOW_FONT(*pstyle) &&
+		    (fw->inactive_title_font =
+		     FlocaleLoadFont(dpy, SGET_INACTIVE_WINDOW_FONT(*pstyle), "FVWM")))
+		{
+			SET_USING_DEFAULT_INACTIVE_WINDOW_FONT(fw, 0);
+		}
+		else
+		{
+			/* no explicit font or failed to load, use active title font
+			 * instead */
+			fw->inactive_title_font = fw->title_font;
+			SET_USING_DEFAULT_INACTIVE_WINDOW_FONT(fw, 1);
+		}
+		SET_INACTIVE_WINDOW_FONT_LOADED(fw, 1);
+	}
 	setup_title_geometry(fw, pstyle);
 
 	return;
diff -r -U3 fvwm/fvwm/borders.c fvwm/fvwm/borders.c
--- fvwm/fvwm/borders.c	2008-03-07 05:53:47.000000000 +0100
+++ fvwm/fvwm/borders.c	2008-03-07 05:58:46.000000000 +0100
@@ -3525,7 +3525,7 @@
 
 static void border_draw_title_mono(
 	FvwmWindow *fw, titlebar_descr *td, title_draw_descr *tdd,
-	FlocaleWinString *fstr, Pixmap dest_pix)
+	FlocaleWinString *fstr, Pixmap dest_pix, Bool do_hilight)
 {
 	int has_vt;
 
@@ -3535,7 +3535,8 @@
 		td->offset - 2, 0, td->length+4, fw->title_thickness);
 	if (fw->visible_name != (char *)NULL)
 	{
-		FlocaleDrawString(dpy, fw->title_font, fstr, 0);
+		FlocaleDrawString(dpy, do_hilight ? fw->title_font :
+			fw->inactive_title_font, fstr, 0);
 	}
 	/* for mono, we clear an area in the title bar where the window
 	 * title goes, so that its more legible. For color, no need */
@@ -3599,7 +3600,7 @@
 
 static void border_draw_title_deep(
 	FvwmWindow *fw, titlebar_descr *td, title_draw_descr *tdd,
-	FlocaleWinString *fstr, Pixmap dest_pix, Window w)
+	FlocaleWinString *fstr, Pixmap dest_pix, Window w, Bool do_hilight)
 {
 	DecorFace *df;
 	pixmap_background_type bg;
@@ -3621,14 +3622,15 @@
 				1);
 		}
 	}
-	FlocaleDrawString(dpy, fw->title_font, &tdd->fstr, 0);
+	FlocaleDrawString(dpy, do_hilight ? fw->title_font :
+		fw->inactive_title_font, &tdd->fstr, 0);
 
 	return;
 }
 
 static void border_get_titlebar_draw_descr(
 	FvwmWindow *fw, titlebar_descr *td, title_draw_descr *tdd,
-	Pixmap dest_pix)
+	Pixmap dest_pix, Bool do_hilight)
 {
 	rectangle *title_g;
 
@@ -3644,7 +3646,8 @@
 		tdd->rgc = td->cd->relief_gc;
 		tdd->sgc = td->cd->shadow_gc;
 	}
-	NewFontAndColor(fw->title_font, td->cd->fore_color, td->cd->back_color);
+	NewFontAndColor(do_hilight ? fw->title_font : fw->inactive_title_font,
+		td->cd->fore_color, td->cd->back_color);
 	title_g = &td->layout.title_g;
 	tdd->tstyle = &TB_STATE(
 		GetDecor(fw, titlebar))[td->tbstate.tstate].style;
@@ -3682,7 +3685,7 @@
 }
 
 static void border_set_title_pixmap(
-	FvwmWindow *fw, titlebar_descr *td, Pixmap *dest_pix, Window w)
+	FvwmWindow *fw, titlebar_descr *td, Pixmap *dest_pix, Window w, Bool do_hilight)
 {
 	pixmap_background_type bg;
 	title_draw_descr tdd;
@@ -3690,7 +3693,7 @@
 	Bool free_bg_pixmap = False;
 	rectangle pix_g;
 
-	border_get_titlebar_draw_descr(fw, td, &tdd, *dest_pix);
+	border_get_titlebar_draw_descr(fw, td, &tdd, *dest_pix, do_hilight);
 	/* prepare background, either from the window colour or from the
 	 * border style */
 	if (!DFS_USE_BORDER_STYLE(*tdd.tstyle))
@@ -3758,11 +3761,11 @@
 
 	if (Pdepth < 2)
 	{
-		border_draw_title_mono(fw, td, &tdd, &fstr, *dest_pix);
+		border_draw_title_mono(fw, td, &tdd, &fstr, *dest_pix, do_hilight);
 	}
 	else
 	{
-		border_draw_title_deep(fw, td, &tdd, &fstr, *dest_pix, w);
+		border_draw_title_deep(fw, td, &tdd, &fstr, *dest_pix, w, do_hilight);
 	}
 	border_draw_title_relief(fw, td, &tdd, *dest_pix);
 	border_draw_title_stick_lines(fw, td, &tdd, *dest_pix);
@@ -3771,7 +3774,7 @@
 }
 
 static void border_draw_title(
-	FvwmWindow *fw, titlebar_descr *td)
+	FvwmWindow *fw, titlebar_descr *td, Bool do_hilight)
 {
 	Pixmap p;
 
@@ -3789,7 +3792,7 @@
 #if 0
 	fprintf(stderr,"drawing title\n");
 #endif
-	border_set_title_pixmap(fw, td, &p, FW_W_TITLE(fw));
+	border_set_title_pixmap(fw, td, &p, FW_W_TITLE(fw), do_hilight);
 	if (td->draw_rotation != ROTATION_0)
 	{
 		Pixmap tmp;
@@ -4278,9 +4281,9 @@
 	if (fw->visible_name != (char *)NULL)
 	{
 		ret_td->length = FlocaleTextWidth(
-			fw->title_font, fw->visible_name,
-			(ret_td->has_vt) ? -strlen(fw->visible_name) :
-			strlen(fw->visible_name));
+			do_hilight ? fw->title_font : fw->inactive_title_font,
+			fw->visible_name, (ret_td->has_vt) ?
+			-strlen(fw->visible_name) : strlen(fw->visible_name));
 		if (ret_td->length > fw->title_length -
 		    2*MIN_WINDOW_TITLE_TEXT_OFFSET)
 		{
@@ -4386,7 +4389,7 @@
 	}
 	if ((draw_parts & PART_TITLE) != PART_NONE)
 	{
-		border_draw_title(fw, &td);
+		border_draw_title(fw, &td, do_hilight);
 	}
 	if ((draw_parts & PART_BUTTONS) != PART_NONE)
 	{
diff -r -U3 fvwm/fvwm/fvwm.h fvwm/fvwm/fvwm.h
--- fvwm/fvwm/fvwm.h	2008-03-07 05:53:47.000000000 +0100
+++ fvwm/fvwm/fvwm.h	2008-03-07 05:58:46.000000000 +0100
@@ -198,6 +198,7 @@
 	unsigned has_icon_font : 1;
 	unsigned has_no_border : 1;
 	unsigned has_window_font : 1;
+	unsigned has_inactive_window_font : 1;
 	unsigned title_dir : 2;
 	unsigned user_states : 32;
 	/* static flags that do not change dynamically after the window has
@@ -359,11 +360,13 @@
 	unsigned is_viewport_moved : 1;
 	unsigned is_window_being_moved_opaque : 1;
 	unsigned is_window_font_loaded : 1;
+	unsigned is_inactive_window_font_loaded : 1;
 	unsigned is_window_shaded : 1;
 	unsigned used_title_dir_for_shading : 1;
 	unsigned shaded_dir : 3;
 	unsigned using_default_icon_font : 1;
 	unsigned using_default_window_font : 1;
+	unsigned using_default_inactive_window_font : 1;
 #define ICON_HINT_NEVER    0
 #define ICON_HINT_ONCE     1
 #define ICON_HINT_MULTIPLE 2
@@ -637,6 +640,7 @@
 	signed char icon_title_relief;
 	char *icon_font;
 	char *window_font;
+	char *inactive_window_font;
 	char *fore_color_name;
 	char *back_color_name;
 	char *fore_color_name_hi;
@@ -780,6 +784,7 @@
 
 	/* title font */
 	FlocaleFont *title_font;
+	FlocaleFont *inactive_title_font;
 	/* /Y coordinate to draw the title name */
 	short title_text_offset;
 	short title_length;
diff -r -U3 fvwm/fvwm/style.c fvwm/fvwm/style.c
--- fvwm/fvwm/style.c	2008-03-07 05:53:47.000000000 +0100
+++ fvwm/fvwm/style.c	2008-03-07 05:58:46.000000000 +0100
@@ -415,6 +415,22 @@
 				*merged_style, SGET_WINDOW_FONT(*add_style));
 		}
 	}
+	if (S_HAS_INACTIVE_WINDOW_FONT(SCF(*add_style)))
+	{
+		if (do_free_src_and_alloc_copy)
+		{
+			SAFEFREE(SGET_INACTIVE_WINDOW_FONT(*merged_style));
+			SSET_INACTIVE_WINDOW_FONT(
+				*merged_style, (SGET_INACTIVE_WINDOW_FONT(*add_style)) ?
+				safestrdup(SGET_INACTIVE_WINDOW_FONT(*add_style)) :
+				NULL);
+		}
+		else
+		{
+			SSET_INACTIVE_WINDOW_FONT(
+				*merged_style, SGET_INACTIVE_WINDOW_FONT(*add_style));
+		}
+	}
 	if (add_style->flags.use_start_on_desk)
 	{
 		SSET_START_DESK(*merged_style, SGET_START_DESK(*add_style));
@@ -802,6 +818,10 @@
 	{
 		SAFEFREE(SGET_WINDOW_FONT(*style));
 	}
+	if (pmask->common.has_inactive_window_font)
+	{
+		SAFEFREE(SGET_INACTIVE_WINDOW_FONT(*style));
+	}
 	if (pmask->has_icon)
 	{
 		SAFEFREE(SGET_ICON_NAME(*style));
@@ -2966,6 +2986,15 @@
 			S_SET_IS_UNICONIFIABLE(SCM(*ps), 1);
 			S_SET_IS_UNICONIFIABLE(SCC(*ps), 1);
 		}
+		else if (StrEquals(token, "InactiveFont"))
+		{
+			SAFEFREE(SGET_INACTIVE_WINDOW_FONT(*ps));
+			rest = GetNextToken(rest, &token);
+			SSET_INACTIVE_WINDOW_FONT(*ps, token);
+			S_SET_HAS_INACTIVE_WINDOW_FONT(SCF(*ps), (token != NULL));
+			S_SET_HAS_INACTIVE_WINDOW_FONT(SCM(*ps), 1);
+			S_SET_HAS_INACTIVE_WINDOW_FONT(SCC(*ps), 1);
+		}
 		else if (StrEquals(token, "IndexedWindowName"))
 		{
 			S_SET_USE_INDEXED_WINDOW_NAME(SCF(*ps), on);
@@ -4762,6 +4791,12 @@
 		flags->do_update_window_font = 1;
 	}
 
+	/* has_inactive_window_font */
+	if (S_HAS_INACTIVE_WINDOW_FONT(SCC(*ret_style)))
+	{
+		flags->do_update_window_font = True;
+	}
+
 	/* has_stippled_title */
 	if (S_HAS_STIPPLED_TITLE(SCC(*ret_style)) ||
 	    S_HAS_NO_STICKY_STIPPLED_TITLE(SCC(*ret_style)) ||
diff -r -U3 fvwm/fvwm/style.h fvwm/fvwm/style.h
--- fvwm/fvwm/style.h	2008-03-07 05:53:47.000000000 +0100
+++ fvwm/fvwm/style.h	2008-03-07 05:58:46.000000000 +0100
@@ -267,6 +267,10 @@
 	((c).has_window_font)
 #define S_SET_HAS_WINDOW_FONT(c,x) \
 	((c).has_window_font = !!(x))
+#define S_HAS_INACTIVE_WINDOW_FONT(c) \
+	((c).has_inactive_window_font)
+#define S_SET_HAS_INACTIVE_WINDOW_FONT(c,x) \
+	((c).has_inactive_window_font = !!(x))
 #define S_ICON_OVERRIDE(c) \
 	((c).s.icon_override)
 #define S_SET_ICON_OVERRIDE(c,x) \
@@ -459,6 +463,10 @@
 	((s).window_font)
 #define SSET_WINDOW_FONT(s,x) \
 	((s).window_font = (x))
+#define SGET_INACTIVE_WINDOW_FONT(s) \
+	((s).inactive_window_font)
+#define SSET_INACTIVE_WINDOW_FONT(s,x) \
+	((s).inactive_window_font = (x))
 #define SGET_COLORSET(s) \
 	((s).colorset)
 #define SSET_COLORSET(s,x) \
Sólo en fvwm/fvwm: style.h.orig
diff -r -U3 fvwm/fvwm/window_flags.h fvwm/fvwm/window_flags.h
--- fvwm/fvwm/window_flags.h	2008-03-07 05:53:47.000000000 +0100
+++ fvwm/fvwm/window_flags.h	2008-03-07 05:58:46.000000000 +0100
@@ -572,6 +572,12 @@
 	(fw)->flags.is_window_font_loaded = !!(x)
 #define SETM_WINDOW_FONT_LOADED(fw,x) \
 	(fw)->flag_mask.is_window_font_loaded = !!(x)
+#define IS_INACTIVE_WINDOW_FONT_LOADED(fw) \
+	((fw)->flags.is_inactive_window_font_loaded)
+#define SET_INACTIVE_WINDOW_FONT_LOADED(fw,x) \
+	(fw)->flags.is_inactive_window_font_loaded = !!(x)
+#define SETM_INACTIVE_WINDOW_FONT_LOADED(fw,x) \
+	(fw)->flag_mask.is_inactive_window_font_loaded = !!(x)
 #define CR_MOTION_METHOD(fw) \
 	((fw)->flags.cr_motion_method)
 #define SET_CR_MOTION_METHOD(fw,x) \
@@ -614,6 +620,12 @@
 	(fw)->flags.using_default_window_font = !!(x)
 #define SETM_USING_DEFAULT_WINDOW_FONT(fw,x) \
 	(fw)->flag_mask.using_default_window_font = !!(x)
+#define USING_DEFAULT_INACTIVE_WINDOW_FONT(fw) \
+	((fw)->flags.using_default_inactive_window_font)
+#define SET_USING_DEFAULT_INACTIVE_WINDOW_FONT(fw,x) \
+	(fw)->flags.using_default_inactive_window_font = !!(x)
+#define SETM_USING_DEFAULT_INACTIVE_WINDOW_FONT(fw,x) \
+	(fw)->flag_mask.using_default_inactive_window_font = !!(x)
 #define USING_DEFAULT_ICON_FONT(fw) \
 	((fw)->flags.using_default_icon_font)
 #define SET_USING_DEFAULT_ICON_FONT(fw,x) \
--- fvwm-/NEWS  2008-03-07 06:37:28.000000000 +0100
+++ fvwm/NEWS   2008-03-07 06:36:01.000000000 +0100
@@ -11,6 +11,7 @@
      TitleAtBottom, TitleAtTop, TitleAtLeft, TitleAtRight
    - Added new menu separator menustyle: FlatSeparator
    - Added new titlestyle: ButtonWidth
+   - Added new style: InactiveFont
 
 * Bug fixes:
 
diff -r -U3 fvwm/tests/purify/purify.fvwm2rc fvwm/tests/purify/purify.fvwm2rc
--- fvwm/tests/purify/purify.fvwm2rc	2008-03-07 05:53:47.000000000 +0100
+++ fvwm/tests/purify/purify.fvwm2rc	2008-03-07 06:19:29.000000000 +0100
@@ -1528,13 +1528,23 @@
 AddTest "Test StyleIconFont" StyleIconFont-Func
 AddToFunc StyleIconFont-Func
  + I StyleAndUpdate * IconFont
- + I StyleAndUpdate * IconFont     9x15
- + I StyleAndUpdate * IconFont		9x15
+ + I StyleAndUpdate * IconFont 9x15
+ + I StyleAndUpdate * IconFont 9x15
  + I StyleAndUpdate * IconFont /nonexistent/foo/bar
  + I StyleAndUpdate * IconFont -adobe-helvetica-bold-r-*-*-*-140-*-*-*-*-*-*
  + I StyleAndUpdate * IconFont -adobe-helvetica-bold-r-*-*-*-140-*-*-*-*-*-*
  + I StyleAndUpdate * IconFont
 
+AddTest "Test StyleInactiveFont" StyleInactiveFont-Func
+AddToFunc StyleInactiveFont-Func
+ + I StyleAndUpdate * InactiveFont
+ + I StyleAndUpdate * InactiveFont 9x15
+ + I StyleAndUpdate * InactiveFont 9x15
+ + I StyleAndUpdate * InactiveFont /nonexistent/foo/bar
+ + I StyleAndUpdate * InactiveFont -adobe-helvetica-bold-r-*-*-*-140-*-*-*-*-*-*
+ + I StyleAndUpdate * InactiveFont -adobe-helvetica-bold-r-*-*-*-140-*-*-*-*-*-*
+ + I StyleAndUpdate * InactiveFont
+
 # Just arbitrary break in style tests:
 AddTest "Test Style2" Style2-Func
 AddToFunc Style2-Func
@@ -3463,6 +3473,7 @@
 # EchoDo GotoPage
 # EchoDo HilightColor
 # EchoDo IconFont
+# EchoDo InactiveFont
 # EchoDo Iconify
 # EchoDo IconPath
 # EchoDo Key
diff -r -U3 fvwm/ChangeLog fvwm/ChangeLog
--- fvwm/ChangeLog	2008-03-07 05:34:21.000000000 +0100
+++ fvwm/ChangeLog	2008-03-07 05:28:14.000000000 +0100
@@ -19,6 +19,14 @@
   *fvwm/doc/commands/MenuStyle.xml
 	added the menustyle FlatSeparators documentation
 
+	*fvwm/doc/commands/TitleStyle.xml
+	added documentation for the ButtonWidth patch
+
+	*fvwm/frame.c
+	*fvwm/screen.h
+	*fvwm/builtins.c
+	patched for ButtonWidth
+
 2008-02-29  Viktor Griph  <griph(at)dd(dot)chalmers(dot)se>
 
 	* fvwm/add_window.c (setup_frame_window):
diff -r -U3 fvwm/doc/commands/TitleStyle.xml fvwm/doc/commands/TitleStyle.xml
--- fvwm/doc/commands/TitleStyle.xml	2008-03-07 05:33:39.000000000 +0100
+++ fvwm/doc/commands/TitleStyle.xml	2008-03-07 05:24:09.000000000 +0100
@@ -25,6 +25,11 @@
 		>MinHeight <optional
 			><replaceable>num</replaceable
 		></optional
+	></arg
+	><arg choice='opt'
+		>ButtonWidth <optional
+			><replaceable>num</replaceable
+		></optional
 	></arg>
 </cmdsynopsis>
 
@@ -36,6 +41,9 @@
 sets the title bar's height to an amount in pixels.
 <fvwmopt cmd="TitleStyle" opt="MinHeight"/>
 sets the minimal height in pixels of the title bar.
+<fvwmopt cmd="TitleStyle" opt="ButtonWidth"/>
+Sets the width of the title bar buttons. Setting a width
+of 0 or no width uses the title height, as before.
 Defaults are
 <emphasis remap='I'>Centered</emphasis>,
 the window's font height and no minimal height.
diff -r -U3 fvwm/fvwm/builtins.c fvwm/fvwm/builtins.c
--- fvwm/fvwm/builtins.c	2008-03-07 05:33:39.000000000 +0100
+++ fvwm/fvwm/builtins.c	2008-03-07 05:13:38.000000000 +0100
@@ -492,6 +492,21 @@
 			if (action)
 				action += next;
 		}
+		else if (!do_add && StrEquals(parm,"buttonwidth"))
+		{
+			int width = 0;
+			int next = 0;
+
+			sscanf(action, "%d%n", &width, &next);
+
+			if (decor->button_width != width)
+			{
+				decor->button_width = width;
+				decor->flags.has_changed = 1;
+			}
+			if (action)
+				action += next;
+		}
 		else if (!do_add && StrEquals(parm,"MinHeight"))
 		{
 			int height = 0;
diff -r -U3 fvwm/fvwm/frame.c fvwm/fvwm/frame.c
--- fvwm/fvwm/frame.c	2008-03-07 05:33:38.000000000 +0100
+++ fvwm/fvwm/frame.c	2008-03-07 05:13:38.000000000 +0100
@@ -1369,7 +1369,14 @@
 	tb_thick = fw->title_thickness;
 	nbuttons = fw->nr_left_buttons + fw->nr_right_buttons;
 	nbuttons_big = 0;
-	b_length = tb_thick;
+	if (fw->decor->button_width == 0)
+	{
+		b_length = tb_thick;
+	}
+	else
+	{
+		b_length = fw->decor->button_width;
+	}
 	t_length = tb_length - nbuttons * b_length;
 	if (nbuttons > 0 && t_length < MIN_WINDOW_TITLE_LENGTH)
 	{
diff -r -U3 fvwm/fvwm/screen.h fvwm/fvwm/screen.h
--- fvwm/fvwm/screen.h	2008-03-07 05:33:38.000000000 +0100
+++ fvwm/fvwm/screen.h	2008-03-07 05:13:38.000000000 +0100
@@ -286,6 +286,7 @@
 #endif
 	int title_height;           /* explicitly specified title bar height */
 	int min_title_height;
+	int button_width;
 	/* titlebar buttons */
 	TitleButton buttons[NUMBER_OF_TITLE_BUTTONS];
 	TitleButton titlebar;
diff -r -U3 fvwm/NEWS fvwm/NEWS
--- fvwm/NEWS	2008-03-07 05:34:21.000000000 +0100
+++ fvwm/NEWS	2008-03-07 05:29:47.000000000 +0100
@@ -10,6 +10,7 @@
    - Added new condition masks: HasTitle, HasBorders,
      TitleAtBottom, TitleAtTop, TitleAtLeft, TitleAtRight
    - Added new menu separator menustyle: FlatSeparator
+   - Added new titlestyle: ButtonWidth
 
 * Bug fixes:
 

Reply via email to