Author: everaldo
Date: 2006-11-07 15:18:31 -0500 (Tue, 07 Nov 2006)
New Revision: 67489

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs
Log:
Fix left click checking.

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-11-07 19:40:49 UTC (rev 67488)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-11-07 20:18:31 UTC (rev 67489)
@@ -1,3 +1,7 @@
+2006-11-07  Everaldo Canuto  <[EMAIL PROTECTED]>
+
+       * ToolBar.cs: Fix left click checking.
+
 2006-11-07  Chris Toshok  <[EMAIL PROTECTED]>
 
        * ProgressBar.cs: fix a typo in ToString().  fixes a unit test.

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs       
2006-11-07 19:40:49 UTC (rev 67488)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs       
2006-11-07 20:18:31 UTC (rev 67489)
@@ -612,11 +612,11 @@
                                                        }
                                                        break;
                                                }
-                                       } else if (me.Button == 
MouseButtons.Left) {
-                                       button.pressed = true;
-                                       button.inside = true;
-                                       button.InvalidateBorder ();
-                                       break;
+                                       } else if ((me.Button & 
MouseButtons.Left) == MouseButtons.Left) {
+                                               button.pressed = true;
+                                               button.inside = true;
+                                               button.InvalidateBorder ();
+                                               break;
                                        }
                                }
                        }
@@ -645,7 +645,7 @@
                                                }
                                        }
                                        // Fire a ButtonClick
-                                       if ((button.pressed) && (me.Button == 
MouseButtons.Left))
+                                       if ((button.pressed) && ((me.Button & 
MouseButtons.Left) == MouseButtons.Left))
                                                OnButtonClick (new 
ToolBarButtonClickEventArgs (button));
                                } else if (button.pressed) {
                                        button.pressed = false;

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

Reply via email to