Subject: incoming/1296 proposed bug fix

From: Paul Vojta <[email-masked]>
Date: Thu, 19 Aug 2004 00:01:56 -0700 (PDT)

Folks:

I've looked into bug #1296, and found that it seems to be due to the fact
that the code in placement.c is inconsistent on whether it expects PageTop
and PageBottom to incorporate pdeltay (and likewise for Page{Left,Right}
and pdeltax).

Here's a proposed patch:

---- cut here ----
--- fvwm-2.5.10/fvwm/placement.c.orig	2004-03-17 08:57:50.000000000 -0800
+++ fvwm-2.5.10/fvwm/placement.c	2004-08-18 20:58:12.000000000 -0700
@@ -280,7 +280,7 @@
 		{
 			test_y +=1;
 		}
-	} /* while */
+	} /* for */
 	if (loc_ok == False)
 	{
 		return False;
@@ -873,8 +873,8 @@
 	rc = False;
 	PageLeft   = screen_g.x - pdeltax;
 	PageTop    = screen_g.y - pdeltay;
-	PageRight  = PageLeft + screen_g.width - pdeltax;
-	PageBottom = PageTop + screen_g.height - pdeltay;
+	PageRight  = PageLeft + screen_g.width;
+	PageBottom = PageTop + screen_g.height;
 	xl = -1;
 	yt = PageTop;
 	/* override if Manual placement happen */
@@ -1016,8 +1016,8 @@
 		{
 			Scr.cascade_y = 2 * fw->title_thickness;
 		}
-		attr_g->x = Scr.cascade_x + PageLeft - pdeltax;
-		attr_g->y = Scr.cascade_y + PageTop - pdeltay;
+		attr_g->x = Scr.cascade_x + PageLeft;
+		attr_g->y = Scr.cascade_y + PageTop;
 		/* try to keep the window on the screen */
 		get_window_borders(fw, &b);
 		if (attr_g->x + fw->frame_g.width >= PageRight)
---- cut here ----

I haven't checked whether there are any similar errors elsewhere in
fvwm (I'm not that familiar with the code).  But, this does it for me.

--Paul Vojta, [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]

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 19 Aug 2004 21:57:45 +0200

> and PageBottom to incorporate pdeltay (and likewise for Page{Left,Right}

The old code indeed looks broken.  I will commit your patch
shortly.  Thanks for your help.

Ciao

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]