Subject: FvwmButtons relief bug

From: Remko Troncon <[email-masked]>
Date: Mon, 10 Feb 2003 20:38:55 +0100

Hello,

This patch is a fix for a relief bug of FvwmButtons, where negative
values for the Frame width did not cause the relief to be inverted (as
the manual says). The bug appeared in version 1.54 of draw.c, because
the RelieveButton() call was moved after the f=abs(f) line, causing the 
frame width parameter of RelieveButton() always to be positive.

cheers,
Remko

--- fvwm-cvs/modules/FvwmButtons/draw.c	Tue Nov  5 13:30:29 2002
+++ fvwm-cvs.patched/modules/FvwmButtons/draw.c	Mon Feb 10 20:28:17 2003
@@ -206,7 +206,7 @@
 void RedrawButton(button_info *b, int draw, XEvent *pev)
 {
 	int i,j,k,BH,BW;
-	int f,x,y,px,py;
+	int f,of,x,y,px,py;
 	int ix,iy,iw,ih;
 	FlocaleFont *Ffont=buttonFont(b);
 	XGCValues gcv;
@@ -354,6 +354,7 @@
 
 	/* ------------------------------------------------------------------ */
 
+    of=f;
 	f=abs(f);
 
 	if (draw == DRAW_CLEAN)
@@ -618,7 +619,7 @@
 	}
 
 	/* relief */
-	RelieveButton(MyWindow,f,x,y,BW,BH,hc,sc,rev ^ rev_xor);
+	RelieveButton(MyWindow,of,x,y,BW,BH,hc,sc,rev ^ rev_xor);
 }
 
 /**
--
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: Olivier Chapuis <[email-masked]>
Date: Thu, 13 Feb 2003 22:02:23 +0100

> frame width parameter of RelieveButton() always to be positive.

Applied.

Thanks, Olivier