mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 21:13:23 -07:00
Excluding some Windows 8 code for non Windows 8 systems.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2458 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
8b0253bdf9
commit
0dc3e6b960
1 changed files with 9 additions and 1 deletions
|
@ -1544,6 +1544,10 @@ namespace GreenshotPlugin.Core {
|
||||||
/// <returns>List<WindowDetails> with visible metro apps</returns>
|
/// <returns>List<WindowDetails> with visible metro apps</returns>
|
||||||
public static List<WindowDetails> GetMetroApps() {
|
public static List<WindowDetails> GetMetroApps() {
|
||||||
List<WindowDetails> metroApps = new List<WindowDetails>();
|
List<WindowDetails> metroApps = new List<WindowDetails>();
|
||||||
|
// 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"};
|
//string[] wcs = {"ImmersiveGutter", "Snapped Desktop", "ImmersiveBackgroundWindow","ImmersiveLauncher","Windows.UI.Core.CoreWindow","ApplicationManager_ImmersiveShellWindow","SearchPane","MetroGhostWindow","EdgeUiInputWndClass", "NativeHWNDHost", "Shell_CharmWindow"};
|
||||||
//List<WindowDetails> specials = new List<WindowDetails>();
|
//List<WindowDetails> specials = new List<WindowDetails>();
|
||||||
//foreach(string wc in wcs) {
|
//foreach(string wc in wcs) {
|
||||||
|
@ -1636,7 +1640,7 @@ namespace GreenshotPlugin.Core {
|
||||||
if (window.Iconic) {
|
if (window.Iconic) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Windows without size
|
// Windows without size
|
||||||
Size windowSize = window.WindowRectangle.Size;
|
Size windowSize = window.WindowRectangle.Size;
|
||||||
if (windowSize.Width == 0 || windowSize.Height == 0) {
|
if (windowSize.Width == 0 || windowSize.Height == 0) {
|
||||||
|
@ -1670,6 +1674,10 @@ namespace GreenshotPlugin.Core {
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static WindowDetails GetAppLauncher() {
|
public static WindowDetails GetAppLauncher() {
|
||||||
|
// Only if Windows 8 (or higher)
|
||||||
|
if (appVisibility == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
IntPtr appLauncher = User32.FindWindow(METRO_APPLAUNCHER_CLASS, null);
|
IntPtr appLauncher = User32.FindWindow(METRO_APPLAUNCHER_CLASS, null);
|
||||||
if (appLauncher != IntPtr.Zero) {
|
if (appLauncher != IntPtr.Zero) {
|
||||||
return new WindowDetails (appLauncher);
|
return new WindowDetails (appLauncher);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue