Skip to content

Commit

Permalink
make the change optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosentti committed Jun 19, 2024
1 parent 2ec5b7b commit 8b2690b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/Headless/Avalonia.Headless/HeadlessWindowImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public ILockedFramebuffer Lock()

public Action<WindowTransparencyLevel>? TransparencyLevelChanged { get; set; }

public WindowTransparencyLevel TransparencyLevel => WindowTransparencyLevel.Transparent;
public WindowTransparencyLevel TransparencyLevel { get; set; } = WindowTransparencyLevel.Transparent;

public Action? GotInputWhenDisabled { get; set; }

Expand Down Expand Up @@ -372,7 +372,15 @@ public void SetWindowManagerAddShadowHint(bool enabled)

public void SetTransparencyLevelHint(IReadOnlyList<WindowTransparencyLevel> transparencyLevel)
{

foreach (var item in transparencyLevel)
{
if (item == WindowTransparencyLevel.Transparent) {
TransparencyLevel = item;
return;
}
}

TransparencyLevel = WindowTransparencyLevel.None;
}

public void SetParent(IWindowImpl? parent)
Expand Down

0 comments on commit 8b2690b

Please sign in to comment.