Windows 0.2.22 clean UI-maintenance source delta; no private history or other platform changes
This commit is contained in:
@@ -346,15 +346,15 @@ internal static class WindowChromeSelfTest
|
||||
private static int Distance(Color a, Color b) => Math.Abs(a.R - b.R) + Math.Abs(a.G - b.G) + Math.Abs(a.B - b.B);
|
||||
internal sealed record MinimizeInputProbe(bool Mouse, bool PointTargetsButton, bool CapturedAfterDown,
|
||||
int Clicks, bool CapturedDuringClick, bool ManagedMinimized, bool NativeMinimized, bool Visible,
|
||||
long ReadyElapsedMilliseconds, bool ReadyTimedOut)
|
||||
long ReadyElapsedMilliseconds, bool ReadyTimedOut, bool ExpectedTray = false, bool HiddenFromTaskbar = false)
|
||||
{
|
||||
public bool Passed => (!Mouse || PointTargetsButton && CapturedAfterDown) && Clicks == 1
|
||||
&& ManagedMinimized && NativeMinimized && Visible;
|
||||
&& (ExpectedTray ? HiddenFromTaskbar : ManagedMinimized && NativeMinimized && Visible);
|
||||
}
|
||||
|
||||
// Call only for a fixture created by the caller. No global input injection,
|
||||
// external HWND search, live client, token, process or network interaction.
|
||||
internal static Task<MinimizeInputProbe> ProbeMinimizeInputAsync(Form form, CaptionButton button, bool mouse)
|
||||
internal static Task<MinimizeInputProbe> ProbeMinimizeInputAsync(Form form, CaptionButton button, bool mouse, bool tray = false)
|
||||
{
|
||||
form.BringToFront();
|
||||
form.Activate();
|
||||
@@ -435,7 +435,8 @@ internal static class WindowChromeSelfTest
|
||||
var style = ChromeNative.GetWindowLongPtr(form.Handle, ChromeNative.GwlStyle).ToInt64();
|
||||
completion.SetResult(new(mouse, pointTargetsButton, capturedAfterDown, clicks, capturedDuringClick,
|
||||
form.WindowState == FormWindowState.Minimized, (style & 0x20000000L /* WS_MINIMIZE */) != 0, form.Visible,
|
||||
ReadyElapsedMilliseconds: readyElapsedMilliseconds, ReadyTimedOut: readyTimedOut));
|
||||
ReadyElapsedMilliseconds: readyElapsedMilliseconds, ReadyTimedOut: readyTimedOut,
|
||||
ExpectedTray: tray, HiddenFromTaskbar: !form.Visible && !form.ShowInTaskbar));
|
||||
}
|
||||
catch (Exception error) { completion.SetException(error); }
|
||||
finally { Cleanup(); }
|
||||
|
||||
Reference in New Issue
Block a user