Closed Falci closed 1 year ago
@Falci can you explain a bit on what this does or aims to fix? (I'm not a macos user :|)
From electron docs:
Emitted when the application is activated. Various actions can trigger this event, such as launching the application for the first time, attempting to re-launch the application when it's already running, or clicking on the application's dock or taskbar icon.
Also, re: the change from focus()
to show()
, looks like show()
is macos-only:
app.show() macOS Shows application windows after they were hidden. Does not automatically focus them.
@Falci can you explain a bit on what this does or aims to fix?
Sure. On Mac, when we close Bob (x or cmd+q) the main window disappear but the dock shows Bob as active, as if we could restore it. But if we try to restore, nothing happens.
While there's a check to for the window-all-closed
that prevents the app to be terminated, there was nothing there to recreate the mainWindow
when the app is active again.
https://user-images.githubusercontent.com/1330573/220043600-e92a8f65-6fc0-4356-a3c7-15fd6f14b8db.mov
And the focus()
change wasn't necessary.
I can confirm the same happens for me. Would be great to have a patch version release once it’s merged.
Oh cool, that makes sense, thanks!
Restore the main window from the dock (MacOS only)