Compare commits

..

2 Commits

Author SHA1 Message Date
maj00r
3dfcbca711 fix: the Steam overlay no longer draws its frame counter over the starter
Steam puts its overlay into the starter, the game it launches. In a
window's own redirection surface ANGLE draws through a swap chain of
that window, and the overlay hooks its Present and draws the frame
counter and notifications over the starter. Every window now draws
into a DirectComposition surface, which is drawn without a Present and
still keeps away from the WinUI composition visual that came up black
on 25H2. The redirection surface stays only as the fallback.
2026-11-28 19:38:44 +01:00
dependabot[bot]
9668b4d3b6 build(deps): bump actions/setup-dotnet from 6.0.0 to 6.1.0 (#39)
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 6.0.0 to 6.1.0.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](a98b56852c...0f4a354dd5)

---
updated-dependencies:
- dependency-name: actions/setup-dotnet
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-27 18:06:07 +01:00
4 changed files with 30 additions and 10 deletions

View File

@@ -52,7 +52,7 @@ jobs:
persist-credentials: false
- name: Setup .NET 10
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
dotnet-version: 10.0.x
@@ -142,7 +142,7 @@ jobs:
persist-credentials: false
- name: Setup .NET 10
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
dotnet-version: 10.0.x

View File

@@ -62,7 +62,7 @@ jobs:
persist-credentials: false
- name: Setup .NET 10
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
dotnet-version: 10.0.x

View File

@@ -6,14 +6,27 @@ namespace StarterNG.Tests;
public class WindowSurfacesTests
{
[Fact]
public void Windows_draws_into_the_window_surface_and_never_through_winui_composition()
public void Windows_draws_into_a_directcomposition_surface_and_never_through_winui_composition()
{
var options = WindowSurfaces.Win32Options;
Assert.Equal(new[] { Win32CompositionMode.RedirectionSurface }, options.CompositionMode);
Assert.Equal(Win32CompositionMode.DirectComposition, options.CompositionMode.First());
Assert.DoesNotContain(Win32CompositionMode.WinUIComposition, options.CompositionMode);
}
[Fact]
public void The_window_surface_is_only_the_fallback()
{
// There ANGLE presents through a swap chain, and the Steam overlay draws over it.
Assert.Equal(Win32CompositionMode.RedirectionSurface, WindowSurfaces.Win32Options.CompositionMode.Last());
}
[Fact]
public void No_swap_chain_of_its_own_is_asked_for()
{
Assert.DoesNotContain(Win32CompositionMode.LowLatencyDxgiSwapChain, WindowSurfaces.Win32Options.CompositionMode);
}
[Fact]
public void The_graphics_card_still_draws()
{

View File

@@ -3,17 +3,24 @@ using Avalonia;
namespace StarterNG.Infrastructure;
/// <summary>
/// On Windows the graphics card draws each window of the starter into a surface of that
/// window, not into Avalonia's default WinUI composition visual. On Windows 11 25H2 that
/// On Windows the graphics card draws each window of the starter into a DirectComposition
/// surface, not into Avalonia's default WinUI composition visual. On Windows 11 25H2 that
/// visual was left empty on many starts: the main window, or a dialog opened later,
/// stayed black while the others drew, and came back only now and then. Composition is
/// there for see-through windows and backdrops, and the starter has none.
/// stayed black while the others drew, and came back only now and then.
/// The window's own redirection surface is only the fallback: there ANGLE draws through a
/// swap chain of the window, and the Steam overlay, which Steam puts into the starter as
/// the game it launches, hooks that swap chain's Present and draws its frame counter and
/// notifications over the starter. A composition surface is drawn without a Present.
/// </summary>
public static class WindowSurfaces
{
public static Win32PlatformOptions Win32Options => new()
{
CompositionMode = new[] { Win32CompositionMode.RedirectionSurface }
CompositionMode = new[]
{
Win32CompositionMode.DirectComposition,
Win32CompositionMode.RedirectionSurface
}
};
/// <summary>