fix(window): hide window until webview renders to avoid empty frame
Create the window with visible:false so the empty frame + title bar don't flash while the webview loads. The frontend calls show_main_window from onMount (after first DOM paint) to reveal the window with content already rendered.
This commit is contained in:
1 parent
68b227f46c
commit
f284ac92bc
2 files changed
+18
No files matched your search
@@ -2524,6 +2524,13 @@
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
|
||||
Reference in new issue
Block a user