aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shell/ash.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 15c0e56a3..4b063217a 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -2981,17 +2981,10 @@ static int console_state(void)
2981 DECLARE_PROC_ADDR(BOOL, ShowWindow, HWND, int); 2981 DECLARE_PROC_ADDR(BOOL, ShowWindow, HWND, int);
2982 2982
2983 if (INIT_PROC_ADDR(user32.dll, ShowWindow)) { 2983 if (INIT_PROC_ADDR(user32.dll, ShowWindow)) {
2984 BOOL state; 2984 BOOL visible = IsWindowVisible(GetConsoleWindow());
2985 BOOL iconified = IsIconic(GetConsoleWindow());
2985 2986
2986 if (noiconify) { 2987 return !visible || iconified;
2987 state = IsWindowVisible(GetConsoleWindow());
2988 if (state >= 0)
2989 return state == 0;
2990 } else {
2991 state = IsIconic(GetConsoleWindow());
2992 if (state >= 0)
2993 return state != 0;
2994 }
2995 } 2988 }
2996 return 2; 2989 return 2;
2997} 2990}