Fix Environment.UserInteractive on Windows#1234
Conversation
67406aa to
e6ea75b
Compare
|
Build break ... LGTM otherwise. |
|
All failures are from the bad ARM legs. |
…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.
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.
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.
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.
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