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.others({ screen: window.screen() }) seems duplicate some Windows #118

Closed
alswl opened this issue Jul 13, 2016 · 5 comments
Closed
Assignees
Labels

Comments

@alswl
Copy link
Contributor

alswl commented Jul 13, 2016

  • Version: Version 2.2 (33)
  • macOS: 10.11.5 (15F34)

When I use window.screen(), some application will duplicate in it.

The Google Chrome will cause this case.

function alert(message) {
  var modal = new Modal();
  modal.message = message;
  modal.duration = 2;
  modal.show();
}

var windows = window.others({ screen: window.screen() });
alert(_.map(windows, function(x) {return x.app().name();}).join(','));
@kasper
Copy link
Owner

kasper commented Jul 13, 2016

@alswl Does this happen with the master build?

@kasper kasper added the invalid label Jul 13, 2016
@kasper kasper self-assigned this Jul 13, 2016
@kasper
Copy link
Owner

kasper commented Jul 13, 2016

@alswl I think this is invalid. An app can certainly have multiple windows in one screen (though they might not be visible).

@kasper kasper closed this as completed Jul 13, 2016
@alswl
Copy link
Contributor Author

alswl commented Jul 13, 2016

@kasper Yes, it happen with the master build.

But in the old version Phoenix, the Google Chrome is only one windows.

I'll try with condition of visible windows.

@alswl
Copy link
Contributor Author

alswl commented Jul 13, 2016

You are right, add visible filter makes it works.

  var windows = _.filter(
    window.others({ screen: window.screen() }),
    function(x) { return x.isVisible(); }
  );

@kasper
Copy link
Owner

kasper commented Jul 13, 2016

@alswl Use window.others({ visible: true, screen: window.screen() }). There was a misbehaviour in the previous release that caused the other windows to be determined only from the visible windows.

alswl added a commit to alswl/.oOo. that referenced this issue Jul 13, 2016
alswl added a commit to alswl/.oOo. that referenced this issue May 18, 2022
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