diff options
author | Stephen McConnel <stephen_mcconnel@sil.org> | 2015-02-26 02:00:30 +0300 |
---|---|---|
committer | Stephen McConnel <stephen_mcconnel@sil.org> | 2015-02-26 02:00:30 +0300 |
commit | 0c95513a0ebdace7423d207c63f259be4bc252be (patch) | |
tree | d077f3107f3972f7f4b8d33f8515b4a2259bb424 /mcs/class/Managed.Windows.Forms | |
parent | e02337995e033d28e23f9f8dbd2d4effa049cb41 (diff) |
Prevent right click from triggering ToolStrip.OnItemClicked
This addresses https://bugzilla.xamarin.com/show_bug.cgi?id=26887
(along with a previous fix).
Diffstat (limited to 'mcs/class/Managed.Windows.Forms')
-rw-r--r-- | mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs index 6cfe4b2ecf8..0c505ead94a 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs @@ -962,8 +962,9 @@ namespace System.Windows.Forms { // If we're currently over an item (set in MouseMove) if (mouse_currently_over != null && !(mouse_currently_over is ToolStripControlHost) && mouse_currently_over.Enabled) { - // Fire our ItemClicked event - OnItemClicked (new ToolStripItemClickedEventArgs (mouse_currently_over)); + // Fire our ItemClicked event, but only for a left mouse click. + if (mea.Button == MouseButtons.Left) + OnItemClicked (new ToolStripItemClickedEventArgs (mouse_currently_over)); // Fire the item's MouseUp event if (mouse_currently_over != null) |