diff --git a/Dalamud/Interface/Windowing/Window.cs b/Dalamud/Interface/Windowing/Window.cs index 1ad7afdbd..f173f8256 100644 --- a/Dalamud/Interface/Windowing/Window.cs +++ b/Dalamud/Interface/Windowing/Window.cs @@ -193,12 +193,25 @@ namespace Dalamud.Interface.Windowing this.OnOpen(); } + var wasFocused = this.IsFocused; + if (wasFocused) + { + var style = ImGui.GetStyle(); + var focusedHeaderColor = style.Colors[(int)ImGuiCol.TitleBgActive]; + ImGui.PushStyleColor(ImGuiCol.TitleBgCollapsed, focusedHeaderColor); + } + if (ImGui.Begin(this.WindowName, ref this.internalIsOpen, this.Flags)) { // Draw the actual window contents this.Draw(); } + if (wasFocused) + { + ImGui.PopStyleColor(); + } + this.IsFocused = ImGui.IsWindowFocused(ImGuiFocusedFlags.RootAndChildWindows); var escapeDown = Service.Get()[VirtualKey.ESCAPE];