mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-27 17:09:37 +01:00
fix: windows of the starter no longer come up black on Windows 11 25H2 (#63)
* fix: windows of the starter no longer come up black on Windows 11 25H2 Avalonia composes each window through a WinUI composition visual by default, and on 25H2 that visual was often left empty: the main window or a dialog opened later stayed black while the others drew. The starter has no see-through windows or backdrops, so every window now draws into its own redirection surface, still on the graphics card. --software-render comes after and keeps its own options. * test: the choice between window surfaces and the processor is covered The choice moves out of Program, which no test runs, into WindowSurfaces, where both branches are tested. Sonar's quality gate failed on the coverage of the new code. --------- Co-authored-by: maj00r <maj00r@host>
This commit is contained in:
@@ -73,8 +73,9 @@ static class Program
|
||||
};
|
||||
}
|
||||
|
||||
// Without the switch the graphics card draws, into the window surfaces.
|
||||
private static AppBuilder WithSoftwareRenderIfAsked(this AppBuilder builder) =>
|
||||
_softwareRender ? SoftwareRender.ApplyTo(builder) : builder;
|
||||
WindowSurfaces.ApplyTo(builder, _softwareRender);
|
||||
|
||||
public static AppBuilder BuildAvaloniaApp()
|
||||
=> AppBuilder.Configure<App>()
|
||||
|
||||
Reference in New Issue
Block a user