diff --git a/Greenshot/Destinations/PickerDestination.cs b/Greenshot/Destinations/PickerDestination.cs index f050497eb..bda6cb7df 100644 --- a/Greenshot/Destinations/PickerDestination.cs +++ b/Greenshot/Destinations/PickerDestination.cs @@ -63,15 +63,18 @@ namespace Greenshot.Destinations { ContextMenuStrip menu = new ContextMenuStrip(); menu.Closing += delegate(object source, ToolStripDropDownClosingEventArgs eventArgs) { LOG.DebugFormat("Close reason: {0}", eventArgs.CloseReason); - switch (eventArgs.CloseReason) { - case ToolStripDropDownCloseReason.ItemClicked: - case ToolStripDropDownCloseReason.CloseCalled: - case ToolStripDropDownCloseReason.Keyboard: - break; - default: - eventArgs.Cancel = true; - break; - } + switch (eventArgs.CloseReason) { + case ToolStripDropDownCloseReason.ItemClicked: + case ToolStripDropDownCloseReason.CloseCalled: + break; + case ToolStripDropDownCloseReason.Keyboard: + // Dispose as the close is clicked + surface.Dispose(); + break; + default: + eventArgs.Cancel = true; + break; + } }; foreach (IDestination destination in destinations) { // Fix foreach loop variable for the delegate