diff options
author | iain holmes <iain@xamarin.com> | 2015-07-16 13:53:18 +0300 |
---|---|---|
committer | iain holmes <iain@xamarin.com> | 2015-12-11 21:44:51 +0300 |
commit | a9051db4756bd2a5ccc9a03585e36bd4b6765d2b (patch) | |
tree | 4935bfa868ac7d06921723b96540cb87ff7f63bd | |
parent | 9c775855d351bb62892bb62a2a1eb1dc102dad7e (diff) |
[Components] Prevent simultaneous command dispatches
Disable command processing on OS X when a modal dialog is running
Fixes BXC #29519 - Multiple copies of the same modal dialog can be made visible at the same time
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs index 205ac7ecfc..3a6d3adb40 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs @@ -333,6 +333,12 @@ namespace MonoDevelop.Components.Commands return null; } + // If a modal dialog is running then the menus are disabled, even if the commands are not + // See MDMenuItem::IsGloballyDisabled + if (DesktopService.IsModalDialogRunning ()) { + return ev; + } + var gdkev = MonoDevelop.Components.Mac.GtkMacInterop.ConvertKeyEvent (ev); if (gdkev != null) { if (ProcessKeyEvent (gdkev)) @@ -1166,7 +1172,7 @@ namespace MonoDevelop.Components.Commands return false; commandId = CommandManager.ToCommandId (commandId); - + List<HandlerCallback> handlers = new List<HandlerCallback> (); ActionCommand cmd = null; try { |