Subject: Tiny bugfix (2.0.47d/fvwm/menu.c)

From: Ryoma Murai <[email-masked]>
Date: Mon, 2 Nov 1998 16:03:12 +0900 (JST)

To: [email-masked]
Subject Tiny bugfix (2.0.47d/fvwm/menu.c)

This is very tiny patch.
File: 2.0.47d/fvwm/menu.c

||-|\-/\-/|--------------------------------------++
|| ||_||_||  algernon is mouse.    Ryoma.Murai   ||
||  \    / [email-masked] ||
++---~||~----------------------------------------||

--- menus.c.org	Wed Jul  1 02:05:38 1998
+++ menus.c	Sun Nov  1 16:40:18 1998
@@ -1060,10 +1060,17 @@
 	(((*mi->item)!=0) || mi->picture || mi->lpicture))
       {
 	/* thicker shadow border for selected button for motif */
-	RelieveRectangle(mr->w, mr->xoffset+3, y_offset, mr->width-5, mi->y_height,
-			 ReliefGC,ShadowGC);
-	RelieveRectangle(mr->w, mr->xoffset+2, y_offset-1, mr->width-3, mi->y_height+2,
-			 ReliefGC,ShadowGC);
+	  if (mr->sidePic == NULL) {
+	      RelieveRectangle(mr->w, mr->xoffset+3, y_offset, mr->width-6, mi->y_height,
+			       ReliefGC,ShadowGC);
+	      RelieveRectangle(mr->w, mr->xoffset+2, y_offset-1, mr->width-4, mi->y_height+2,
+			       ReliefGC,ShadowGC);
+	  } else {
+	      RelieveRectangle(mr->w, mr->xoffset+3, y_offset, mr->width-6 - mr->sidePic->width-5, mi->y_height,
+			       ReliefGC,ShadowGC);
+	      RelieveRectangle(mr->w, mr->xoffset+2, y_offset-1, mr->width-4 - mr->sidePic->width-5, mi->y_height+2,
+			       ReliefGC,ShadowGC);
+	  }
       }
     RelieveHalfRectangle(mr->w, 0, y_offset-1, mr->width,
 			 y_height+2, ReliefGC, ShadowGC);
@@ -1082,8 +1089,12 @@
     XClearArea(dpy, mr->w, mr->xoffset,y_offset,mr->width,y_height,0);
     if ((mi->state)&&(!mi->fIsSeparator)&&
 	(((*mi->item)!=0)|| mi->picture || mi->lpicture ))
-      RelieveRectangle(mr->w, mr->xoffset+2, y_offset, mr->width-4, mi->y_height,
-		       ReliefGC,ShadowGC);
+	if (mr->sidePic == NULL)
+	    RelieveRectangle(mr->w, mr->xoffset+2, y_offset, mr->width-4, mi->y_height,
+			     ReliefGC,ShadowGC);
+	else
+	    RelieveRectangle(mr->w, mr->xoffset+2, y_offset, mr->width-4 - mr->sidePic->width-5, mi->y_height,
+			     ReliefGC,ShadowGC);
     RelieveHalfRectangle(mr->w, 0, y_offset, mr->width,
 			 y_height, ReliefGC, ShadowGC);
   } 
@@ -1600,7 +1611,10 @@
 	}
     }
   mr->in_use = 0;
-  mr->height = y+2;
+  if(USING_FVWM_MENUS)
+      mr->height = y+2;
+  else
+      mr->height = y+3;

 #ifndef NO_SAVEUNDERS   
--
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].