From 51a5c8e69d75dba02c3b87e22f189b0ecefd52dd Mon Sep 17 00:00:00 2001 From: Esme Povirk Date: Wed, 8 Mar 2023 13:58:50 -0600 Subject: [PATCH] Change the default OverlayBox implementations. Win32LayeredBox is preferable on Windows because of WS_EX_TRANSPARENT. Otherwise, the split window approach is simpler. --- xalia/Sdl/Win32WindowingSystem.cs | 2 +- xalia/Sdl/WindowingSystem.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xalia/Sdl/Win32WindowingSystem.cs b/xalia/Sdl/Win32WindowingSystem.cs index 94e14c2..c825d93 100644 --- a/xalia/Sdl/Win32WindowingSystem.cs +++ b/xalia/Sdl/Win32WindowingSystem.cs @@ -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(); diff --git a/xalia/Sdl/WindowingSystem.cs b/xalia/Sdl/WindowingSystem.cs index 40cdc16..987420c 100644 --- a/xalia/Sdl/WindowingSystem.cs +++ b/xalia/Sdl/WindowingSystem.cs @@ -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);