From d44ae4f713ded581bc053f3ad74b4ce0b59504f7 Mon Sep 17 00:00:00 2001 From: RKrom Date: Fri, 1 Jun 2012 05:57:57 +0000 Subject: [PATCH] Fixing the balloon & capture problem. By hiding and showing the tray-icon the Greenshot balloon disappears! A cleaner way would be to check if a balloon is still shown (close event didn't occur) but for now this should do. git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1907 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4 --- Greenshot/Helpers/CaptureHelper.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Greenshot/Helpers/CaptureHelper.cs b/Greenshot/Helpers/CaptureHelper.cs index 8475fed9f..d220e7cff 100644 --- a/Greenshot/Helpers/CaptureHelper.cs +++ b/Greenshot/Helpers/CaptureHelper.cs @@ -156,6 +156,12 @@ namespace Greenshot.Helpers { /// Make Capture with specified destinations /// private void MakeCapture() { + // This fixes a problem when a balloon is still visible and a capture needs to be taken + // forcefully removes the balloon! + if (!conf.HideTrayicon) { + MainForm.instance.notifyIcon.Visible = false; + MainForm.instance.notifyIcon.Visible = true; + } LOG.Debug(String.Format("Capturing with mode {0} and using Cursor {1}", captureMode, captureMouseCursor)); capture.CaptureDetails.CaptureMode = captureMode; @@ -463,7 +469,7 @@ namespace Greenshot.Helpers { surface.Modified = !outputMade; // Register notify events if this is wanted - if (conf.ShowTrayNotification) { + if (conf.ShowTrayNotification && !conf.HideTrayicon) { surface.SurfaceMessage += delegate(object source, SurfaceMessageEventArgs eventArgs) { if (string.IsNullOrEmpty(eventArgs.Message)) { return;