diff --git a/GreenshotPlugin/Core/WindowsHelper.cs b/GreenshotPlugin/Core/WindowsHelper.cs index e8d4d0e4c..d3a81754b 100644 --- a/GreenshotPlugin/Core/WindowsHelper.cs +++ b/GreenshotPlugin/Core/WindowsHelper.cs @@ -1544,6 +1544,10 @@ namespace GreenshotPlugin.Core { /// List with visible metro apps public static List GetMetroApps() { List metroApps = new List(); + // if the appVisibility != null we have Windows 8. + if (appVisibility == null) { + return metroApps; + } //string[] wcs = {"ImmersiveGutter", "Snapped Desktop", "ImmersiveBackgroundWindow","ImmersiveLauncher","Windows.UI.Core.CoreWindow","ApplicationManager_ImmersiveShellWindow","SearchPane","MetroGhostWindow","EdgeUiInputWndClass", "NativeHWNDHost", "Shell_CharmWindow"}; //List specials = new List(); //foreach(string wc in wcs) { @@ -1636,7 +1640,7 @@ namespace GreenshotPlugin.Core { if (window.Iconic) { continue; } - + // Windows without size Size windowSize = window.WindowRectangle.Size; if (windowSize.Width == 0 || windowSize.Height == 0) { @@ -1670,6 +1674,10 @@ namespace GreenshotPlugin.Core { /// /// public static WindowDetails GetAppLauncher() { + // Only if Windows 8 (or higher) + if (appVisibility == null) { + return null; + } IntPtr appLauncher = User32.FindWindow(METRO_APPLAUNCHER_CLASS, null); if (appLauncher != IntPtr.Zero) { return new WindowDetails (appLauncher);