Skip to content

backends: Use floating point checks in MetaViewportInfo

Carlos Garnacho requested to merge carlosg/mutter:wip/fix-viewport-checks into main

In these checks, it's an important detail to preserve subpixel information in order to correctly determine whether the coordinates are inside or outside a view.

Otherwise, small enough motion towards the left/top might get rounded to 0, be seen as "inside the view", and the pointer coordinates be allowed to escape the viewport constraints.

This was figured out by Pascal Nowack before me, with a difference of minutes. Credit where credit is due.

Closes: #3530 (closed) Fixes: 6c972546 ("mtk: Add Rectangle.contains_point")

Edited by Robert Mader

Merge request reports

Loading