New windows position handling leads to weird effects in multi screen workstations

Issue #923 resolved
Ruediger created an issue

Hi Stefan,

the new windows position handling leads to very weird effects.

Main window is opened one screen, profile chooser three displays left, updater on another screen between and VC redist yet on another as the dialog. The update and start used all 5 displays attached. Gymnastics for the neck 😃 like watching tennis.

Comments (28)

  1. Stefan B repo owner

    Sorry i don’t understand what you are trying to tell. Can you rephrase it or make a screenshot of the problem?

  2. Ruediger reporter

    Hi Stefan,

    E.g. when starting:

    1. splash screen (NINA Logo) is on display 3
    2. profile chooser is on display 2
    3. main window on display 4

    or when installing:

    dialog, VC redist and main window use three different displays.

    This is on one hand very unergonomic, on the other hand it can be problematic if you have windows on other screens with the attribute “always on top”. Then these NINA windows are created under these window and you won’t see or find them.

  3. Stefan B repo owner

    I have two screens and can’t reproduce the problem. When i open the app the profile chooser is in the center of the app

    Is this with fullscreen? Is this when changing the screen? I really need a step by step description, otherwise i cannot reproduce this.

  4. Ruediger reporter
    1. I double click NINA icon on desktop
    2. Half transparent splash screen is shown in center of display 3
    3. main window is open in full screen on display 4
    4. profile chooser gets opened on display 2 (not in center)

    ‌

    ‌

  5. Ruediger reporter

    In non full screen mode the profile chooser is shown on the correct display, but not the splash screen.

  6. Stefan B repo owner

    The splash screen is entirely out of control of us, as it is managed by the wpf framework. for the rest i will look into why this pops up in the different locations.

  7. Ruediger reporter

    Many thanks 🙏

    The splash screen is not important. It has no function and vanishes by its own.

  8. Ruediger reporter
    • changed status to open

    Hi Stefan,

    the Problem is only partially fixed. Now the profile chooser is shown on the same screen,

    But NINA seems only to store window position/display, when it was not maximized on closing. If it was closed maximized it gets opened on the display where it was closed non-maximized the last timet.

    It looks like It stores only position if it gets closed not maximized.

    RĂźdiger

    ‌

  9. Ruediger reporter

    One important additional observation, which might help:

    When NINA gets opened maximized on the wrong display, and then switched from maximized to not-maximized the window jumps to the correct display.

    It looks like the position is stored, but applied after “de-maximizing”.

    RĂźdiger

    ‌

  10. Stefan B repo owner

    The fix was only resolving the erratic window behaviour.

    Starting with maximized will use the primary screen currently. That's a known gap.

    Haven't found yet a solution for it, as the handling of WPF for maximized windows is not great and there is no built in way to do it. Similar problem when calculating the position of the sub windows as the maximized windows does not report its position correctly so I have added some pinvokes to query for the real size

  11. Ruediger reporter

    Hi Stefan,

    here it does not use the primary only. It opens maximized, on that screen it was closed not maximized the last time.

    I was also expecting to use the primary only, but it is not bound to primary.

  12. Stefan B repo owner

    Yea it's using the last non maximzed position as reference. For the wpf framework all displays are treated as one uniform virtual screen when in windowed mode. However when maximizing the framework seems to not handle this properly anymore and these effects we are seeing will happen.

  13. Stefan B repo owner

    I have done a lot of digging and also tried out multiple approaches.

    Each and every approach improves one thing and worsens another. At least the initial problem with the pop up windows is resolved, and the broadest use case for a single monitor is working.

  14. Ruediger reporter

    That’s a pity.

    A solution could be to give an option in the profile to disable storing windows positions.

  15. Stefan B repo owner

    What would be the benefit then? you would still have to position your window, when it starts at the default position

  16. Ruediger reporter

    I would avoid that NINA is opened unter „always on top“ windows. The old behavior is much more predictable, than the new one.

  17. Stefan B repo owner

    I think I have found one solution to preserve the window in which it was maximized. It will sometimes lose the position of the non maximized window when changing back, but that might be acceptable

  18. Ruediger reporter

    Installed the latest version and it works much better. The windows are opened at predictable positions also on multi screen.

    Thanks for the fix!

    RĂźdiger

  19. Log in to comment