Skip to content

Make Workspace::outputAt() more robust to extreme values

Since QPointF can have values that exceed INT_MAX, "distance < minDistance" may not be triggered for the first output.

In order to make Workspace::outputAt() more robust with such extreme cases, this patch changes the type of minDistance from int to qreal to avoid truncation and adds an explicit check to initialize bestOutput when we see the first workspace output.

It would be also great to add size hints sanitization code in kwin, but it can be done later.

BUG: 460446


Should close:

Merge request reports