Skip to content

DisplayModel getting bounding rect from offset sometimes inaccurate on higher DPI #9531

@LeonarddeR

Description

@LeonarddeR

This issue is slightly hypothetical, but in a corporate environment where I had to use the display model to make an application accessible, I continuously received the wrong coordinates for an offset in the model when DPI was at 150%. Setting the DPI back to 100% resolved this.

When getting a bounding rectangle from an offset in a DisplayModelTextInfo, logical coordinates are converted to physical coordinates. This happens based on the window handle of the window of which the display model is created.

However, a display model can contain text from descendant windows with different window handles. A big window can be displayed on multiple screens, all with a different DPI setting. When getting a bounding rectangle from an offset within a descendant window using the handle of the parent window to convert it to physical coordinates, the wrong coordinates can be returned in these cases.

To make sure that this code is accurate, NVDA should calculate physical coordinates from logical coordinates based on the window handle at the particular offset for which the rectangle is requested.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions