Index: Headers/gnustep/gui/NSButton.h
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/gui/Headers/gnustep/gui/NSButton.h,v
retrieving revision 1.6
diff -u -r1.6 NSButton.h
--- Headers/gnustep/gui/NSButton.h	26 Dec 2000 21:42:06 -0000	1.6
+++ Headers/gnustep/gui/NSButton.h	27 Jul 2003 07:25:47 -0000
@@ -39,6 +39,8 @@
 @interface NSButton : NSControl
 {
   // Attributes
+@private
+  NSTrackingRectTag _trkTag;
 }
 
 //
Index: Source/NSButtonCell.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/gui/Source/NSButtonCell.m,v
retrieving revision 1.77
diff -u -r1.77 NSButtonCell.m
--- Source/NSButtonCell.m	13 Jun 2003 15:01:11 -0000	1.77
+++ Source/NSButtonCell.m	27 Jul 2003 07:25:49 -0000
@@ -445,7 +445,6 @@
 
 - (void)setShowsBorderOnlyWhileMouseInside:(BOOL)show
 {
-  // FIXME: Switch mouse tracking on
   _shows_border_only_while_mouse_inside = show;
 }
 
@@ -616,15 +615,24 @@
   // draw the border if needed
   if (_cell.is_bordered)
     {
-      // FIXME Should check the bezel and gradient style
-      if (_cell.is_highlighted && (_highlightsByMask & NSPushInCellMask))
-        {
-          NSDrawGrayBezel(cellFrame, NSZeroRect);
-        }
+      if ((_shows_border_only_while_mouse_inside && _mouse_inside)
+	  || !_shows_border_only_while_mouse_inside)
+	{
+          // FIXME Should check the bezel and gradient style
+          if (_cell.is_highlighted && (_highlightsByMask & NSPushInCellMask))
+            {
+              NSDrawGrayBezel(cellFrame, NSZeroRect);
+            }
+          else
+            {
+              NSDrawButton(cellFrame, NSZeroRect);
+            }
+	}
       else
-        {
-          NSDrawButton(cellFrame, NSZeroRect);
-        }
+	{
+	  [[NSColor controlBackgroundColor] set];
+	  NSRectFill (cellFrame);
+	}
     }
 
   [self drawInteriorWithFrame: cellFrame inView: controlView];
@@ -718,12 +726,6 @@
 
   if (imageToDisplay)
     {
-      /* FIXME - the following is a hack!  Because we don't seem to be
-	 getting alpha composing of images right, we use this hack of
-	 hard-setting manually the background color of the image to
-	 the wanted background color ... this should go away when
-	 alpha composing of images works 100%.  */
-      [imageToDisplay setBackgroundColor: backgroundColor];
       imageSize = [imageToDisplay size];
     }
 
@@ -1061,12 +1063,20 @@
 
 - (void) mouseEntered: (NSEvent *)event
 {
+  NSView *view = (NSView *)[event userData];
+
   _mouse_inside = YES;
+
+  [view setNeedsDisplay: YES];
 }
 
 - (void) mouseExited: (NSEvent *)event
 {
+  NSView *view = (NSView *)[event userData];
+
   _mouse_inside = NO;
+
+  [view setNeedsDisplay: YES];
 }
 
 - (void) performClick: (id)sender
Index: Source/NSButton.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/gui/Source/NSButton.m,v
retrieving revision 1.46
diff -u -r1.46 NSButton.m
--- Source/NSButton.m	13 Jun 2003 15:01:11 -0000	1.46
+++ Source/NSButton.m	27 Jul 2003 07:25:49 -0000
@@ -77,6 +77,21 @@
   return YES;
 }
 
+- (void) resetCursorRects
+{
+  [super resetCursorRects];
+
+  if (_trkTag)
+    {
+      [self removeTrackingRect: _trkTag];
+    }
+
+  _trkTag = [self addTrackingRect: _bounds
+		  	    owner: _cell
+	       		 userData: self
+	             assumeInside: NO];
+}
+
 //
 // Setting the Button Type
 //
