mirror of
https://github.com/Eugeny/tabby.git
synced 2024-11-13 10:58:00 +03:00
autofocus window
This commit is contained in:
parent
8c4c07c39b
commit
524ccd06f3
@ -39,6 +39,19 @@ loadConfig().then(configStore => {
|
||||
application.handleSecondInstance(newArgv, cwd)
|
||||
})
|
||||
|
||||
if (!app.requestSingleInstanceLock()) {
|
||||
app.quit()
|
||||
app.exit(0)
|
||||
}
|
||||
|
||||
if (argv.d) {
|
||||
electronDebug({
|
||||
isEnabled: true,
|
||||
showDevTools: true,
|
||||
devToolsMode: 'undocked',
|
||||
})
|
||||
}
|
||||
|
||||
app.on('ready', async () => {
|
||||
if (process.platform === 'darwin') {
|
||||
app.dock.setMenu(Menu.buildFromTemplate([
|
||||
@ -55,20 +68,8 @@ loadConfig().then(configStore => {
|
||||
const window = await application.newWindow({ hidden: argv.hidden })
|
||||
await window.ready
|
||||
window.passCliArguments(process.argv, process.cwd(), false)
|
||||
window.focus()
|
||||
})
|
||||
}).catch(err => {
|
||||
dialog.showErrorBox('Could not read config', err.message)
|
||||
})
|
||||
|
||||
if (!app.requestSingleInstanceLock()) {
|
||||
app.quit()
|
||||
app.exit(0)
|
||||
}
|
||||
|
||||
if (argv.d) {
|
||||
electronDebug({
|
||||
isEnabled: true,
|
||||
showDevTools: true,
|
||||
devToolsMode: 'undocked',
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user