Author: jpobst
Date: 2008-02-01 12:27:24 -0500 (Fri, 01 Feb 2008)
New Revision: 94528

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs
Log:
2008-02-01  Jonathan Pobst  <[EMAIL PROTECTED]>

        * ListBox.cs: Don't throw [Mouse]Click events for buttons
        other than the left mouse button.

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2008-02-01 16:39:08 UTC (rev 94527)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2008-02-01 17:27:24 UTC (rev 94528)
@@ -1,3 +1,8 @@
+2008-02-01  Jonathan Pobst  <[EMAIL PROTECTED]>
+
+       * ListBox.cs: Don't throw [Mouse]Click events for buttons
+       other than the left mouse button.
+
 2008-01-31  Jonathan Pobst  <[EMAIL PROTECTED]>
 
        * Control.cs: Remove my awesome optimization as it caused some

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs       
2008-02-01 16:39:08 UTC (rev 94527)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs       
2008-02-01 17:27:24 UTC (rev 94528)
@@ -1072,7 +1072,7 @@
                
                protected override void SetBoundsCore (int x,  int y, int 
width, int height, BoundsSpecified specified)
                {
-                       if ((specified & BoundsSpecified.Height) == 
BoundsSpecified.Height)
+                       //if ((specified & BoundsSpecified.Height) == 
BoundsSpecified.Height)
                                requested_height = height;
 
                        if (IntegralHeight) {
@@ -1831,6 +1831,10 @@
 
                private void OnMouseUpLB (object sender, MouseEventArgs e)
                {
+                       // Only do stuff with the left mouse button
+                       if ((e.Button | MouseButtons.Left) == 0)
+                               return;
+                               
                        if (e.Clicks > 1) {
                                OnDoubleClick (EventArgs.Empty);
 #if NET_2_0

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to