Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window doesn't go on top on MacOS #36

Closed
sheerun opened this issue Aug 17, 2019 · 2 comments
Closed

Window doesn't go on top on MacOS #36

sheerun opened this issue Aug 17, 2019 · 2 comments

Comments

@sheerun
Copy link

sheerun commented Aug 17, 2019

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?

@mdings
Copy link

mdings commented Oct 11, 2019

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.

@ghost
Copy link

ghost commented Oct 22, 2019

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();
        });        
    });  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants