Skip to content

Restoring floating window position on multiple monitors uses wrong Point for Virtual Screen location #150

@charles-roberts

Description

@charles-roberts

The check in ILayoutElementForFloatingWindowExtension.KeepInsideNearestMonitor is using 0,0 for the upper left of the Virtual Screen. The result is that floating windows on a monitor to the left or top of a main monitor will be restored onto the main monitor when the layout is deserialized. I think an easy fix is to change:

In /Components/Xceed.Wpf.AvalonDock.Layout/ILayoutElementForFloatingWindowExtension.cs

RECT primaryscreen = new RECT(0, 0, ...

to

RECT primaryscreen = new RECT((int)SystemParameters.VirtualScreenLeft, (int)SystemParameters.VirtualScreenTop, ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions