-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Environment.UserInteractive on Windows #1234
Fix Environment.UserInteractive on Windows #1234
Conversation
src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft/Win32/SystemEvents.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Environment.Windows.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft/Win32/SystemEvents.cs
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Environment.Windows.cs
Outdated
Show resolved
Hide resolved
67406aa
to
e6ea75b
Compare
...s.ServiceController/tests/System.ServiceProcess.ServiceController.TestService/TestService.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft/Win32/SystemEvents.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft/Win32/SystemEvents.cs
Outdated
Show resolved
Hide resolved
Build break ... LGTM otherwise. |
src/coreclr/src/System.Private.CoreLib/System.Private.CoreLib.csproj
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
Outdated
Show resolved
Hide resolved
All failures are from the bad ARM legs. |
src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Environment.Windows.cs
Outdated
Show resolved
Hide resolved
…b.Shared.projitems Co-Authored-By: Jan Kotas <jkotas@microsoft.com>
…b.Shared.projitems Co-Authored-By: Jan Kotas <jkotas@microsoft.com>
…b.Shared.projitems Co-Authored-By: Jan Kotas <jkotas@microsoft.com>
…osemsft/runtime into Environment.UserInteractive
Any more feedback? I can't merge without dismissing your review -- not sure of the protocol CI is fine, except for an unrelated bug I logged. |
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you forgot to invert this logic. Also, should we add back the static property like we had in desktop?
https://referencesource.microsoft.com/#mscorlib/system/environment.cs,1435
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack - thank you @ericstj !
Re the static, @jkotas pointed out that there may be a way to change a process to/from interactive - although I didn't do it successfully myself. See mention here #770 (comment) I saw no reason to cache the value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll make the simple fix for now. FWIW I'm now able to reproduce the test failure, so I can confirm fail/then-fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments crossed. Great, I was about to do it, but apparently you've already got those tests working so you can verify it as well. thanks
Fix #770