Skip to content

[Anchors] Improve the auto position system to support all cases #194

@gileli121

Description

@gileli121

Sometimes the auto-position system will fail to move the anchors away from texts or images.
Examples of such cases (reported by @cpasoft):
image
image

The reason is that the existing UI Automation API failed to detect the elements on the window below the anchors.
When the OS does not know what the window shows, it can't report to WindowTop where the texts are.
As a result, the system in WindowTop will not able to calculate available positions because it has no information about where the texts/images are located.

Until now, it was impossible to fix this issue.
But thanks to what found here: microsoft/Windows.UI.Composition-Win32-Samples#97 (comment)

It should be possible to screenshot the window silently and then use fallback logic that will try to map the location of empty spaces" (where there is no text/image) using image processing.
After the mapping is done, the system will know where to move the anchors

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions