Skip to content

Don't restore sketch location if last.sketch.location is out of display #9814

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

Merged
merged 1 commit into from
Mar 23, 2020

Conversation

facchinm
Copy link
Member

if ((screen.width != screenW) || (screen.height != screenH)) in Base.java was making sure to reset every preference in case the display geometry changed.
Unfortunately, on Windows 10, Toolkit.getDefaultToolkit().getScreenSize() reports only the primary monitor either if external display is connected or not.

Fixes #9781

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Does your submission pass tests?
  2. Have you lint your code locally prior to submission?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes

`if ((screen.width != screenW) || (screen.height != screenH))` was making sure to reset every preference in case the display geometry changed.
Unfortunately, on Windows 10, `Toolkit.getDefaultToolkit().getScreenSize()` reports only the primary monitor either if external display is connected or not.

Fixes arduino#9781
@facchinm facchinm changed the title Don't restore sketch if last.sketch.location is out of display Don't restore sketch location if last.sketch.location is out of display Feb 28, 2020
@cmaglie cmaglie added this to the Release 1.8.13 milestone Mar 23, 2020
@cmaglie cmaglie added Type: Bug Type: Improvement This proposal is considered to be especially beneficial labels Mar 23, 2020
@cmaglie cmaglie merged commit 558ddd3 into arduino:master Mar 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Type: Improvement This proposal is considered to be especially beneficial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problems with 2nd monitor using Arduino IDE
3 participants