繁體中文

問題修復

Windows 視窗切換不留白,也不再亮瞎眼

在 Windows 上快速切換面板時,畫面不會再莫名其妙留白,也不會再閃現刺眼的白光了。以前在切換面板時,系統會在 pywebview(讓桌面程式內嵌顯示網頁畫面的套件)的 JS-API 回呼函式(callback,工作做完後系統自動呼叫回來的那段程式碼)還沒跑完前就急著重新載入畫面,這會把用來等候結果的 Promise(JavaScript 裡用來處理未來才會完成的工作的排隊號碼牌)給摧毀掉,導致 Edge WebView(在桌面程式裡嵌入網頁畫面的瀏覽器元件)卡在一片空白。而且,原本 pywebview 視窗的預設背景色死板地設為白色,就算你開了深色模式,在載入瞬間或圓角邊緣還是會閃瞎你的眼睛。現在它懂等橋樑溝通完畢才載入,還加上了防禦機制,就算你急躁地連點兩下,系統也會重新算出你最後想切去的那個目標面板,不會傻傻沿用已經過期的舊面板;同時視窗背景也會自動讀取你的系統深淺色主題。此外,Windows 的打包檔(PyInstaller bundle,把 Python 程式連同工具包壓成單一執行檔的打包方式)現在也補齊了先前遺漏的 status-line 與 session-hook 原始檔,讓安裝與自我修復流程在執行期能順利複製這些檔案。就像電視換台,以前轉台太快會卡在沒有訊號的白畫面,或者看恐怖片看到一半切台被突然閃現的白光亮瞎;現在不管你怎麼瘋狂轉台,畫面都順滑無比,並且保持在不刺眼的電影院模式。

English

BUGFIX

Windows panel switching avoids blank screens and white flashes

Switching panels rapidly on Windows won't leave you stranded on a blank white screen anymore, and the jarring white flashes are gone. Previously, a panel-switch action rudely reloaded the document before pywebview (a package that embeds web content within desktop apps) finished its JS-API callback (code automatically executed after a task completes), completely destroying the in-flight Promise (a JavaScript placeholder for a task that will finish in the future) and leaving the Edge WebView (the browser component embedded inside the desktop app) entirely blank. Furthermore, pywebview's default window background was hardcoded to white, bleeding blinding flashes through rounded corners or the first frame even if you were using a dark theme. Now, the reload patiently waits until the communication bridge has safely returned, with an extra pending-switch guard so rapid double-clicks correctly recalculate the final target panel instead of reusing an outdated locked one; additionally, the window properly reads your system's light/dark theme. Furthermore, the Windows package (PyInstaller bundle, a way to compress the Python program and tools into a single executable file) now includes the previously omitted status-line and session-hook source files, allowing the setup and self-heal paths to copy them correctly at runtime. It's like flipping channels on a TV—it used to get stuck on blinding static if you mashed the remote, or flash a bright white light before switching to your dark movie; now it changes channels buttery smooth and stays comfortably in dark theater mode.

原始 CHANGELOG

Original changelogWindows 視窗切換不留白,也不再亮瞎眼
**Switching panels on Windows no longer risks a blank white window**: the panel-switch action reloaded the document synchronously from inside the pywebview JS-API callback, which could destroy the in-flight JavaScript Promise callback for that call and leave Edge WebView blank. The reload is now deferred until the bridge call has returned to JavaScript, with a pending-switch guard so rapid double-clicks recompute the target panel instead of reusing a stale one. The Windows PyInstaller bundle also now includes the status-line and session-hook source files that the setup and self-heal paths copy at runtime, which it previously omitted.
**The Windows tray window no longer flashes white regardless of theme**: pywebview's window background defaults to white, which bled through the frameless window's rounded corners (and any unpainted first frame) even when the active panel's CSS was rendering its dark variant. The window background now reads the system's light/dark theme setting and matches the panel's background color.