-
Notifications
You must be signed in to change notification settings - Fork 541
8252446: Screen.getScreens() is empty sometimes #295
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
Conversation
|
/reviewers 2 |
|
👋 Welcome back kcr! A progress list of the required criteria for merging this PR into |
|
@kevinrushforth |
arapte
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. As you mentioned in the comments, On my Mac the test does not fail without this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this on Mac and Ubuntu 20.04. I could not reproduce the issue without the fix and test passes with/without the fix. But the changes make sense, so approving the changes.
This is a case where the Skara |
|
/reviewers 2 contributors |
|
@kevinrushforth |
|
@kevinrushforth This change now passes all automated pre-integration checks. In addition to the automated checks, the change must also fulfill all project specific requirements After integration, the commit message will be:
Since the source branch of this PR was last updated there have been 8 commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid automatic rebasing, please merge ➡️ To integrate this PR with the above commit message to the |
|
/integrate |
|
@kevinrushforth Since your change was applied there have been 8 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 13ab2cb. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
As noted in the bug report, we get a pair of change events every time the list of screens changes. First, a change is sent with an empty list of screens and then a change is sent with the new list of screens. This happens whenever a monitor is plugged in or unplugged. It also happens on Mac at application startup.
As noted in the bug the reason for this is because the
updateConfigurationmethod makes two separate calls on the list of screens,clearandaddAll, rather than callingsetAll. The latter ensures that only a single change event is delivered.I verified that before this fix, the example program attached to the bug works correctly after the fix.
I wrote a unit test. It ends up being skipped on Windows and Linux since we don't get an initial change event. On Mac the test fails without the fix and passes with the fix.
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jfx pull/295/head:pull/295$ git checkout pull/295