fix(desktop): eliminate white flash on window resize in dark mode

Set native window backgroundColor to match the app's surface0 color so
the backing layer is dark during resize repaints. Extend the existing
updateWindowControls IPC to also call setBackgroundColor on all platforms
(including macOS), keeping the renderer as the single source of truth
for theme resolution. Add a prefers-color-scheme CSS rule in index.html
to cover the HTML-to-React mount gap.
This commit is contained in:
Mohamed Boudra
2026-04-01 18:33:17 +07:00
parent ade1e338ea
commit 963c79265a
3 changed files with 22 additions and 2 deletions
+6
View File
@@ -19,6 +19,12 @@
body {
overflow: hidden;
}
/* Prevent white flash before React mounts */
@media (prefers-color-scheme: dark) {
html, body {
background-color: #181B1A;
}
}
/* These styles make the root element full-height */
#root {
display: flex;