[Bug]: Coordinates of the bottom right corner exceed the resolution bounds, resulting in the OnScreenKeyboard failing to render #518
Labels
state:needs-triage
Needs to triaged to determine next steps
state:stale
Has not been updated in a long time
type:bug
Something isn't working
urgency:high
Significant with a critical impact
Is there an existing issue for this?
Current Behavior
The SWM_RECT structure is designed to represent a bounding rectangle, defined by the coordinates of its top-left and bottom-right corners. The top-left coordinates originate from a zero-based index, necessitating the subtraction of one from the bottom-right coordinates to ensure the rectangle's dimensions do not surpass the resolution limits. However, the current implementation omits this decrement, leading to rendering issues with the OnScreenKeyboard on certain screen sizes.
Expected Behavior
For any SWM_RECT instance, the width is calculated as
width = right - left + 1
, and the height is determined byheight = bottom - top + 1
. When the origin point of a rectangle is known, along with its width and height, the right coordinate can be derived usingright = left + width - 1
, and the bottom coordinate is given bybottom = top + height - 1
.Steps To Reproduce
On 13" Laptop:
Build Environment
Version Information
Urgency
High
Are you going to fix this?
I will fix it
Do you need maintainer feedback?
No maintainer feedback needed
Anything else?
No response
The text was updated successfully, but these errors were encountered: