window: use QRect to calculate visiblePixels
If QRectF is used, the exact comparison several lines down will fail.
(cherry picked from commit 59775304)
If QRectF is used, the exact comparison several lines down will fail.
(cherry picked from commit 59775304)