From cfb1fba87f4288f369c734c511be9656ecd4d05a Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Thu, 27 Feb 2020 15:43:26 -0800 Subject: [PATCH] Invert Environment.UserInteractive (fix) --- .../System.Private.CoreLib/src/System/Environment.Windows.cs | 2 +- .../tests/ServiceBaseTests.cs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/Environment.Windows.cs b/src/libraries/System.Private.CoreLib/src/System/Environment.Windows.cs index 98c913a09804e1..e4ac0a0e83211c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Environment.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Environment.Windows.cs @@ -134,7 +134,7 @@ public static unsafe bool UserInteractive uint dummy = 0; if (Interop.User32.GetUserObjectInformationW(handle, Interop.User32.UOI_FLAGS, &flags, (uint)sizeof(Interop.User32.USEROBJECTFLAGS), ref dummy)) { - return ((flags.dwFlags & Interop.User32.WSF_VISIBLE) == 0); + return ((flags.dwFlags & Interop.User32.WSF_VISIBLE) != 0); } } diff --git a/src/libraries/System.ServiceProcess.ServiceController/tests/ServiceBaseTests.cs b/src/libraries/System.ServiceProcess.ServiceController/tests/ServiceBaseTests.cs index 282d54b421b4ea..53ed1b409cbab0 100644 --- a/src/libraries/System.ServiceProcess.ServiceController/tests/ServiceBaseTests.cs +++ b/src/libraries/System.ServiceProcess.ServiceController/tests/ServiceBaseTests.cs @@ -136,7 +136,6 @@ public void TestOnPauseAndContinueThenStop() controller.WaitForStatus(ServiceControllerStatus.Stopped); } - [ActiveIssue("https://github.com/dotnet/runtime/issues/1724")] [ConditionalFact(nameof(IsProcessElevated))] public void TestOnExecuteCustomCommand() {