fix(window): use dark background instead of hidden window

Revert visible:false approach which broke WM buttons on Wayland.
Instead, set html/body background to #0f0f0f (dark theme default)
so the brief frame before webview renders shows a dark surface
instead of a white flash.
This commit is contained in:
vicrodh committed 2026-02-09 14:36:44 -06:00
1 parent f284ac92bc
commit cb6c86324c
3 files changed
+2 -20

No files matched your search

+2 -2
View File
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en">
<html lang="en" style="background-color: #0f0f0f;">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
@@ -7,7 +7,7 @@
<title>QBZ</title>
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<body data-sveltekit-preload-data="hover" style="background-color: #0f0f0f; margin: 0;">
<script>
// Apply system titlebar state before first render to prevent flash
// of custom title bar when system decorations are enabled.
-7
View File
@@ -2524,13 +2524,6 @@
}
onMount(() => {
// Show window now that the DOM has been painted.
// The window starts hidden (visible:false) to avoid showing an
// empty frame while the webview loads.
invoke('show_main_window').catch((e) => {
console.error('Failed to show main window:', e);
});
// Bootstrap app (theme, mouse nav, Last.fm restore)
const { cleanup: cleanupBootstrap } = bootstrapApp();