Subject: this patch makes fvwm2 MWMBorders look like mwm (motif 2.0) _down to the last pixel_.

From: Jakub Jasinski <[email-masked]>
Date: Fri, 19 Jun 1998 20:39:50 -0400

This patch changes some of the stuff in borders.c to truly make the
borders/handles/buttons have a mwm(motif 2.0) look.
FINALLY my fvwm2 looks eleet  :-) (luckily i had motif 2.0 lying around)

--- fvwm-2.0.46/fvwm/add_window.c.orig	Fri Jun 19 20:09:50 1998
+++ fvwm-2.0.46/fvwm/add_window.c	Fri Jun 19 17:34:05 1998
@@ -222,7 +222,7 @@
       tmp_win->fl = &Scr.DefaultDecor;
 #endif
 
-  tmp_win->title_height = GetDecor(tmp_win,TitleHeight) + tmp_win->bw;
+  tmp_win->title_height = GetDecor(tmp_win,TitleHeight) + tmp_win->bw + 1;
 
   GetMwmHints(tmp_win);
   GetOlHints(tmp_win);
--- fvwm-2.0.46/fvwm/borders.c.orig	Fri Jun 19 20:05:38 1998
+++ fvwm-2.0.46/fvwm/borders.c	Fri Jun 19 20:07:54 1998
@@ -1,3 +1,7 @@
+/* patched by Jakub Jasinski ([email-masked])                          */
+/* Now, with MWMBorders on, the windows will look _exactly_ as they do in  */
+/* Motif2.0 mwm                                                            */
+
 /****************************************************************************
  * This module is all original code 
  * by Rob Nation 
@@ -931,25 +935,38 @@
   XDrawSegments(dpy, win, ReliefGC, seg, i);
 
   i=0;
-  seg[i].x1 = x;        seg[i].y1   = y+h-1;
+  seg[i].x1 = x+1;        seg[i].y1   = y+h-1;
+  if (((win == t->sides[2]) || (win == t->corners[3]))&& (t->flags & MWMBorders))
+     seg[i].x1--;
   seg[i].x2 = w+x-1;    seg[i++].y2 = y+h-1;
 
+  if(!((edge == 0) && (t->flags & MWMBorders)))
   if(((t->boundary_width > 2)||(edge == 0))&&
      (!(t->flags & MWMBorders)||
       (((edge==0)||(t->boundary_width > 3))&&(hilite & BOTTOM_HILITE))))
   {
-    seg[i].x1 = x+1;      seg[i].y1   = y+h-2;
+    seg[i].x1 = x+2;      seg[i].y1   = y+h-2;
+    if (((win == t->sides[2]) || (win == t->corners[3])) && (t->flags & MWMBorders))
+       seg[i].x1--;
     seg[i].x2 = x+w-2;    seg[i++].y2 = y+h-2;
   }
 
   seg[i].x1 = x+w-1;    seg[i].y1   = y;
+  if ((edge == 0) && (t->flags & MWMBorders))
+     seg[i].y1++;
+  else
+     seg[i].y1--;
   seg[i].x2 = x+w-1;    seg[i++].y2 = y+h-1;
 
   if(((t->boundary_width > 2)||(edge == 0))&&
      (!(t->flags & MWMBorders)||
       (((edge==0)||(t->boundary_width > 3))&&(hilite & RIGHT_HILITE))))
   {
-    seg[i].x1 = x+w-2;    seg[i].y1   = y+1;
+    seg[i].x1 = x+w-2;    seg[i].y1   = y+2;
+    if ((edge == 0) && (t->flags & MWMBorders))
+       seg[i].y1++;
+    else
+       seg[i].y1--;  
     seg[i].x2 = x+w-2;    seg[i++].y2 = y+h-2;
   }
   XDrawSegments(dpy, win, ShadowGC, seg, i);
@@ -1068,13 +1085,15 @@
     {
       case 0:
         seg[0].x1 = t->boundary_width-1;
-        seg[0].x2 = t->corner_width;
+        seg[0].x2 = t->corner_width + 1;
         seg[0].y1 = t->boundary_width-1;
         seg[0].y2 = t->boundary_width-1;
         n=1;
         break;
       case 1:
         seg[0].x1 = 0;
+        if (t->flags & MWMBorders)
+           seg[0].x1++;
         seg[0].x2 = t->corner_width - t->boundary_width /* -1*/ ;
         seg[0].y1 = t->boundary_width-1;
         seg[0].y2 = t->boundary_width-1;
@@ -1107,7 +1126,11 @@
         break;
       case 1:
         seg[0].y1 = t->boundary_width -1;
+        if (t->flags & MWMBorders)
+           seg[0].y1++;
         seg[0].y2 = t->corner_width - (hh ? 0 : 2);
+        if (t->flags & MWMBorders)
+           seg[0].y2++;
         seg[0].x1 = t->corner_width - t->boundary_width;
         seg[0].x2 = t->corner_width - t->boundary_width;
         n=1;