Closed sheerun closed 4 years ago
I have the same issue. Showing the window doesn't necessarily mean it is shown as the active one on top of any others. This seems to be a bug because the Deskgap window actually does move but always one level behind the topmost one. So if that window covers your window you will never see it.
Here is my trick 😄
app.once('ready', () => {
mainWindow = new BrowserWindow({
title: 'My App',
titleBarStyle: 'default',
resizable: false,
show: false,
width: 500, height: 300,
center: true,
}).once('ready-to-show', () => {
mainWindow.show();
exec('osascript -e \'tell application "My App" to activate\'');
}
});
mainWindow.loadFile('index.html');
mainWindow.on('closed', () => {
mainWindow = null;
app.quit();
});
});
Hello!
I'm noticing that when I run DeskGap on MacOS, the created window stays below terminal.. Is there a way to force newly opened window to be on top?