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

Handle monitor changes by not making the window larger than the screen #1847

Merged

Conversation

sensei-hacker
Copy link
Collaborator

@mmosca wrote:

I often have issues with the configurator opening out of range of my desktop, specially when connecting over remote desktop to my multi monitor desktop
I know the configurator saves its position to launch at the same place, but is it possible to check if the save x and y is actually inside the display area of the current monitor setup?

This code does as requested - ensure the coordinates actually exist on the screen before trying to place the window there.

@mmosca
Copy link
Collaborator

mmosca commented Oct 9, 2023

I will test is soon.

@mmosca
Copy link
Collaborator

mmosca commented Oct 11, 2023

Initial test.

My dual monitor setup:
Primary screen is on the right (screen 2)
image

  • Position saved and restored correctly on primary screen
  • Position saved and restored on secondary screen: Not working. Currently opens on primary screen. I suspect we may be dealing with negative window coordinates.
  • Position save on secondary screen, opening on remote desktop single screen

So far, in my test case, windows always open on primary monitor. I can certainly live with this, but users may want it to open on save position on monitor 2.

@mmosca mmosca added this to the 7.0 milestone Oct 11, 2023
@sensei-hacker
Copy link
Collaborator Author

Yeah the API doesn't let us decide which monitor. It's blind to concept of multiple monitors.

What we the PR DOES do is avoid opening it larger than the monitor it's on. Where the secondary monitor is larger, prior to the PR it could open on the primary using size and position it saved from the secondary. The PR ensures the size and position are sane for the desktop it is on.

@mmosca
Copy link
Collaborator

mmosca commented Oct 11, 2023

This behavior at least means I will always be able to see it.

The app always opens on the primary monitor, but before it would load the saved setting and move off the screen.

@DzikuVx DzikuVx modified the milestones: 7.0, 7.1 Nov 10, 2023
@DzikuVx DzikuVx changed the base branch from master to release_7.1.0 December 26, 2023 19:49
@DzikuVx DzikuVx merged commit 8c39e72 into iNavFlight:release_7.1.0 Dec 26, 2023
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

Successfully merging this pull request may close these issues.

3 participants