diff options
author | abrevet-dev <57099550+abrevet-dev@users.noreply.github.com> | 2020-01-27 13:07:58 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2020-01-27 13:07:58 +0300 |
commit | ed88c509dd59c8901e3cdc26d8c4cd34978c402a (patch) | |
tree | 35d425fa37fa7da6a0bb53598af422186af7a14a /mcs | |
parent | a6a89a5ef4037db04bac6566a0c1ec5f3e7e6ddf (diff) |
[WinForms] Fix #18506 ActiveTracker, do not propagate message to control when it is not enabled and visible. (#18541)
Fixes #18506
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs | 2 |
1 files changed, 1 insertions, 1 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 358533d121b..ecd8c90e51b 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs @@ -1246,7 +1246,7 @@ namespace System.Windows.Forms } else { if (!active_tracker.OnMouseDown (args)) { Control control = GetRealChildAtPoint (Cursor.Position); - if (control != null) { + if (control != null && control.Visible && control.Enabled) { Point pt = control.PointToClient (Cursor.Position); XplatUI.SendMessage (control.Handle, (Msg)m.Msg, |