Skip to content

wayland: Explicitly initialize surface size to 0

Vlad Zahorodnii requested to merge work/zzag/explicit-surface-size into master

QSize() will construct an invalid size. An invalid size has width and height set to -1. In other words, QSize() != QSize(0, 0). This can create issues when computing the bounding rect of a surface that has invisible subsurfaces.

For example, if the subsurface rect is QRect(0,0 -1x-1), the top-left corner of the bounding rect will be affected.

In order to make computation of the bounding rect robust, initialize the surface size to 0 explicitly.

BUG: 454535

Merge request reports