Subject: FvwmBorder windows have a border around the frame

From: [email-masked]
Date: Thu, 14 Jan 1999 10:12:07 -0600 (CST)

Full_Name: Tim Phipps
Version: 
CVS_Date: 14th Jan
OS: 
X_Server: 
Submission from: (NULL) (194.202.174.20)
Submitted by: hippo

The way FvwmBorder style windows are drawn is weird and may be the
cause of meny unknown bugs.  One I just found is with EdgeResistance
when moving off the bottom or right of the screen, patch at the end.
I don't propose to do anything until after 2.2 is released but I'd 
like to remove the border and to change the decoration code to get the
same look.  Then I'd like to remove the ->bw field from the FvwmWindow
structure and fix all the subsequent copile errors.

Index: move.c
===================================================================
RCS file: /home/cvs/fvwm/fvwm/fvwm/move.c,v
retrieving revision 1.26
diff -u -B -b -r1.26 move.c
--- move.c      1999/01/11 05:00:27     1.26
+++ move.c      1999/01/14 15:51:23
@@ -512,17 +512,16 @@
          DoSnapAttract(tmp_win, Width, Height, &xl, &yt);
 
          /* Resist moving windows over the edge of the screen! */
-         if(((xl + Width) >= Scr.MyDisplayWidth)&&
-            ((xl + Width) < Scr.MyDisplayWidth+Scr.MoveResistance))
+         if(((xl + Width + 2 * bw) > Scr.MyDisplayWidth) &&
+            ((xl + Width + 2 * bw) < Scr.MyDisplayWidth +
Scr.MoveResistance))
            xl = Scr.MyDisplayWidth - Width - 2 * bw;
-         if((xl <= 0)&&(xl > -Scr.MoveResistance))
+         if((xl < 0) && (xl > -Scr.MoveResistance))
            xl = 0;
-         if(((yt + Height) >= Scr.MyDisplayHeight)&&
-            ((yt + Height) < Scr.MyDisplayHeight+Scr.MoveResistance))
+         if(((yt + Height + 2 * bw) > Scr.MyDisplayHeight) &&
+            ((yt + Height + 2 * bw) < Scr.MyDisplayHeight +
Scr.MoveResistance))
            yt = Scr.MyDisplayHeight - Height - 2 * bw;
-         if((yt <= 0)&&(yt > -Scr.MoveResistance))
+         if((yt < 0) && (yt > -Scr.MoveResistance))
            yt = 0;
-
          *FinalX = xl;
          *FinalY = yt;
 
@@ -542,15 +541,15 @@
          DoSnapAttract(tmp_win, Width, Height, &xl, &yt);
 
          /* Resist moving windows over the edge of the screen! */
-         if(((xl + Width) >= Scr.MyDisplayWidth)&&
-            ((xl + Width) < Scr.MyDisplayWidth+Scr.MoveResistance))
+         if(((xl + Width + 2 * bw) > Scr.MyDisplayWidth) &&
+            ((xl + Width + 2 * bw) < Scr.MyDisplayWidth +
Scr.MoveResistance))
            xl = Scr.MyDisplayWidth - Width - 2 * bw;
-         if((xl <= 0)&&(xl > -Scr.MoveResistance))
+         if((xl < 0) && (xl > -Scr.MoveResistance))
            xl = 0;
-         if(((yt + Height) >= Scr.MyDisplayHeight)&&
-            ((yt + Height) < Scr.MyDisplayHeight+Scr.MoveResistance))
+         if(((yt + Height + 2 * bw) > Scr.MyDisplayHeight) &&
+            ((yt + Height + 2 * bw) < Scr.MyDisplayHeight +
Scr.MoveResistance))
            yt = Scr.MyDisplayHeight - Height - 2 * bw;
-         if((yt <= 0)&&(yt > -Scr.MoveResistance))
+         if((yt < 0) && (yt > -Scr.MoveResistance))
            yt = 0;
 
          /* check Paging request once and only once after outline redrawn
*/

--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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].