From 44a1f0a8094897a3adcf73425c594436e0da9e86 Mon Sep 17 00:00:00 2001 From: Zhe Fang Date: Wed, 12 Nov 2025 08:37:57 -0500 Subject: [PATCH] fix: Lyrics window did not go back to the correct position when automatically showing back for docked mode --- .../BetterLyrics.WinUI3/Helper/WindowHelper.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Helper/WindowHelper.cs b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Helper/WindowHelper.cs index 94ea850..b303562 100644 --- a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Helper/WindowHelper.cs +++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Helper/WindowHelper.cs @@ -369,7 +369,7 @@ namespace BetterLyrics.WinUI3.Helper { _setLyricsWindowVisibilityByPlayingStatusTimer ??= dispatcherQueue.CreateTimer(); - _setLyricsWindowVisibilityByPlayingStatusTimer.Debounce(() => + _setLyricsWindowVisibilityByPlayingStatusTimer.Debounce(async () => { var window = GetWindowByWindowType(); if (window == null) return; @@ -389,6 +389,12 @@ namespace BetterLyrics.WinUI3.Helper SetIsWorkArea(true); } OpenOrShowWindow(); + if (_liveStatesService.LiveStates.LyricsWindowStatus.IsWorkArea) + { + UpdateWorkArea(); + await Task.Delay(300); + MoveAndResize(_liveStatesService.LiveStates.LyricsWindowStatus.GetWindowBoundsWhenWorkArea()); + } } }, Constants.Time.DebounceTimeout); }