Skip to content

Commit

Permalink
Change the default OverlayBox implementations.
Browse files Browse the repository at this point in the history
Win32LayeredBox is preferable on Windows because of
WS_EX_TRANSPARENT.

Otherwise, the split window approach is simpler.
  • Loading branch information
madewokherd committed Mar 8, 2023
1 parent f85dffc commit 51a5c8e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion xalia/Sdl/Win32WindowingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public override Task ShowKeyboardAsync()

public override OverlayBox CreateOverlayBox()
{
if (Utils.TryGetEnvironmentVariable("XALIA_LAYERED_BOX", out var value) &&
if (!Utils.TryGetEnvironmentVariable("XALIA_LAYERED_BOX", out var value) ||
value != "0")
return new Win32LayeredBox(this);
return base.CreateOverlayBox();
Expand Down
2 changes: 1 addition & 1 deletion xalia/Sdl/WindowingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static WindowingSystem Instance

public virtual OverlayBox CreateOverlayBox()
{
if (Utils.TryGetEnvironmentVariable("XALIA_SPLIT_BOX", out var value) &&
if (!Utils.TryGetEnvironmentVariable("XALIA_SPLIT_BOX", out var value) ||
value != "0")
return new SplitOverlayBox(this);
return new SdlOverlayBox(this);
Expand Down

0 comments on commit 51a5c8e

Please sign in to comment.