display: Correctly round scaled monitor size
Needs to be backported to stable.
We were converting the floating point numbers to integers using a cast, which causes them to be always rounded down. The result is that a monitor may be too small by a pixel, creating broken configurations.
Also fix the same issue when calculating whether a scale should be supported.
Edited by Benjamin Berg