Closed ButzYung closed 1 year ago
Can you please tell me what windows version u using? ( 10 or 11 ).
And the code where refresh
function is used.
Windows 10 Home 22H2
The code is something like this
mainWindow.on("close", function () {
refresh();
});
And whenever detach is used.
detach();
refresh();
If refresh is missing, the desktop area behind the electron window will become black.
if u closed the window before detaching you will face the black screen 100%.
so if u call
detach();
refresh();
and it still result a black screen?
As long as the refresh()
is there the desktop won't go black, even if you haven't detached the window before closing the app. Maybe you should update the readme and inform the users that they need to do so.
I did mention it in the Readme but it wasn't clear why you should call refresh if u closed the window before detaching, I'll include it next commit.
Because no issue is here I'll close it, thanks.
After the electron window has been attached to the desktop, the area where the electron app is displayed will be left black after the app quits. The only way to prevent it is to
refresh()
the window before the app quits (onBrowserWindow
'sclose
event). Detaching the window withoutrefresh()
afterwards also cause the black area problem. Manually refeshing the desktop after the app quits doesn't restore the area. I have to actually change the desktop wallpaper to restore that black area.