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

visible-on-all-workspaces not working on mac #6071

Closed
FahadQurashi49 opened this issue Aug 2, 2017 · 2 comments
Closed

visible-on-all-workspaces not working on mac #6071

FahadQurashi49 opened this issue Aug 2, 2017 · 2 comments
Labels

Comments

@FahadQurashi49
Copy link

I want to show a window opened from Window.open() on all screens of mac, I read this issue, function win.setVisibleOnAllWorkspaces(visible) seems to do my job, but I tried this function and also I tried in manifest visible-on-all-workspaces but nothing seems to work. . I'm using macOS Sierra version 10.12.5, and nw.js version is 0.12.2, below is the code,

myWin = gui.Window.open(url, {
        "title": "test window",
        "frame": false,
        "toolbar": false,
        "focus": true,
        "width": 500,
        "height": 480,
        "resizable": false,
        "transparent": true,
        "position": "center",           
        "new-instance": false,
        "always-on-top": true,
        "visible-on-all-workspaces": true,
        "max_width": 500,
        "max_height": 480
    });

myWin.on('document-end', () => {
    myWin.setVisibleOnAllWorkspaces(true);
    myWin.focus();
});

I have also tried this test case but this does not work as well, running index.html gives error "Uncaught TypeError: undefined is not a function" at line 21, index2.html does not gives any error but the window does not show on all (screens/desktops/workspaces) on mac

@Christywl
Copy link
Contributor

I try on Mac with nwjs-sdk-v0.24.0. It works fine. Your code is out of date for the latest nwjs build. Here is my code:

nw.Window.open("https://nwjs.io", {
        "title": "test window",
        "frame": false,
        "focus": true,
        "width": 500,
        "height": 480,
        "resizable": false,
        "transparent": true,
        "position": "center",           
        "new_instance": false,
        "always_on_top": true,
        "visible_on_all_workspaces": true,
        "max_width": 500,
        "max_height": 480
    }, function(myWin){myWin.on('document-end', () => {
    myWin.focus();
}); });

@FahadQurashi49
Copy link
Author

Yes it is working fine, thanks for help.

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

No branches or pull requests

2 participants