From afbe046d3ec026129d78d94ee9844dc7583ac91f Mon Sep 17 00:00:00 2001 From: RKrom Date: Tue, 23 Oct 2012 09:10:20 +0000 Subject: [PATCH] Fixed issue when the selected IE window to capture is not visible/iconized, a restore fixes this. git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2192 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4 --- Greenshot/Forms/MainForm.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Greenshot/Forms/MainForm.cs b/Greenshot/Forms/MainForm.cs index 9db778fa0..2d2978aa6 100644 --- a/Greenshot/Forms/MainForm.cs +++ b/Greenshot/Forms/MainForm.cs @@ -873,13 +873,17 @@ namespace Greenshot { ToolStripMenuItem clickedItem = (ToolStripMenuItem)sender; KeyValuePair tabData = (KeyValuePair)clickedItem.Tag; BeginInvoke((MethodInvoker)delegate { + WindowDetails ieWindowToCapture = tabData.Key; + if (ieWindowToCapture != null && (!ieWindowToCapture.Visible || ieWindowToCapture.Iconic)) { + ieWindowToCapture.Restore(); + } try { - IECaptureHelper.ActivateIETab(tabData.Key, tabData.Value); + IECaptureHelper.ActivateIETab(ieWindowToCapture, tabData.Value); } catch (Exception exception) { LOG.Error(exception); } try { - CaptureHelper.CaptureIE(false, tabData.Key); + CaptureHelper.CaptureIE(false, ieWindowToCapture); } catch (Exception exception) { LOG.Error(exception); }