Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorabrevet-dev <57099550+abrevet-dev@users.noreply.github.com>2019-12-06 20:41:47 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2019-12-06 20:41:47 +0300
commit4be2a9a20763a232c94c9d0fcbcce877bd7c5474 (patch)
tree5e65277d7a56936d3aff8c8486a2ecf05c669cec /mcs/class/System.Windows.Forms
parentd1db937e78834aac251ed78cb5d44e2d62c7df2a (diff)
[WinForms] Handle menu for wheel button click (close the contextmenu) (#18049)
Fixes #18019
Diffstat (limited to 'mcs/class/System.Windows.Forms')
-rw-r--r--mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs
index c92b7a7aae3..ae2526aa514 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs
@@ -5377,6 +5377,12 @@ namespace System.Windows.Forms
}
private void WmMButtonUp (ref Message m) {
+ // Menu handle.
+ if (XplatUI.IsEnabled (Handle) && active_tracker != null) {
+ ProcessActiveTracker (ref m);
+ return;
+ }
+
MouseEventArgs me;
me = new MouseEventArgs (FromParamToMouseButtons ((int) m.WParam.ToInt32()) | MouseButtons.Middle,
@@ -5395,6 +5401,12 @@ namespace System.Windows.Forms
}
private void WmMButtonDown (ref Message m) {
+ // Menu handle.
+ if (XplatUI.IsEnabled (Handle) && active_tracker != null) {
+ ProcessActiveTracker (ref m);
+ return;
+ }
+
InternalCapture = true;
OnMouseDown (new MouseEventArgs (FromParamToMouseButtons ((int) m.WParam.ToInt32()),
mouse_clicks, LowOrder ((int) m.LParam.ToInt32 ()), HighOrder ((int) m.LParam.ToInt32 ()),