benilla-re systems structs docs

s_clientRect

global · core

Address
0x884e20 · 16 bytes, up to 0x884e2f
Type
int32_t[4]
Meaning
Holds the cached client rectangle: left, top, right, bottom
Confidence
verified, proof one
Finding
core/input#cursor-coordinates

Finding: Cursor coordinates in core: window input

An absolute mouse event's position is given as fractions of the client area: x / width and 1 − y / height, from the client rectangle's width and height, so y runs up from the bottom. x is a 53-bit quotient rounded to a float; y is rounded three times: the quotient and the subtraction at 53 bits, then to a float. The client rectangle comes from a cache filled by GetClientRect and by the pump's size check. A confinement rectangle could clamp the point and move the OS cursor, but it is never set: it stays zero, and the clamp is skipped, as it is only for a zero width or height; a NaN difference would run it.

The derivation is in the doc.