Skip to content

Commit 902a08a

Browse files
committed
focus windows properly on macOS
* showWindowNow has been false by default since commit af6d4ab, however, i can find no reason given for this being the case * as is, this causes windows created on macOS to not be properly focused * focus app after attempting to invoke a second instance of FreeTube, & steal focus from other apps on macOS
1 parent 1f2a624 commit 902a08a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ function runApp() {
276276
// Just focus the main window (instead of starting a new instance)
277277
if (mainWindow.isMinimized()) mainWindow.restore()
278278
mainWindow.focus()
279+
app.focus({ steal: true })
279280

280281
if (url) mainWindow.webContents.send(IpcChannels.OPEN_URL, url)
281282
}
@@ -638,7 +639,7 @@ function runApp() {
638639
{
639640
replaceMainWindow = true,
640641
windowStartupUrl = null,
641-
showWindowNow = false,
642+
showWindowNow = true,
642643
searchQueryText = null
643644
} = { }) {
644645
// Syncing new window background to theme choice.

0 commit comments

Comments
 (0)