From be068ed6d157be89635f9844f8730bd7041399d0 Mon Sep 17 00:00:00 2001 From: defnotken Date: Sun, 21 Dec 2025 12:50:51 -0600 Subject: [PATCH] Imgui Assertion fix --- LightlessSync/UI/ZoneChatUi.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/LightlessSync/UI/ZoneChatUi.cs b/LightlessSync/UI/ZoneChatUi.cs index 396e63c..d01aa2a 100644 --- a/LightlessSync/UI/ZoneChatUi.cs +++ b/LightlessSync/UI/ZoneChatUi.cs @@ -82,6 +82,7 @@ public sealed class ZoneChatUi : WindowMediatorSubscriberBase private string? _dragHoverKey; private bool _HideStateActive; private bool _HideStateWasOpen; + private bool _pushedStyle; public ZoneChatUi( ILogger logger, @@ -139,6 +140,8 @@ public sealed class ZoneChatUi : WindowMediatorSubscriberBase var config = _chatConfigService.Current; var baseOpacity = Math.Clamp(config.ChatWindowOpacity, MinWindowOpacity, MaxWindowOpacity); _baseWindowOpacity = baseOpacity; + ImGui.PushStyleVar(ImGuiStyleVar.WindowBorderSize, 0); + _pushedStyle = true; if (config.FadeWhenUnfocused) { @@ -823,6 +826,16 @@ public sealed class ZoneChatUi : WindowMediatorSubscriberBase ImGui.EndPopup(); } + public override void PostDraw() + { + if (_pushedStyle) + { + ImGui.PopStyleVar(1); + _pushedStyle = false; + } + base.PostDraw(); + } + private void OpenReportPopup(ChatChannelSnapshot channel, ChatMessageEntry message) { if (message.Payload is not { } payload)