Skip to content

Fix confined pointer being able to escape the surface

Vlad Zahorodnii requested to merge work/cherry-pick-bfd755ae into Plasma/6.0

When using fractional scaling, an xwayland window's client geometry can have some fractional part. When that's the case, .toRect() can shrink the client geometry or extruding the decoration borders inside the surface.

On the other hand, the pointer is going to be confined as long as the wl_surface is focused. If the focus jumps to the decoration, the pointer constraint is going to be broken. Unfortunately, the focus can shift to the decoration even though the wl_surface is still focused because of the pesky .toRect().

BUG: 482448 CCBUG: 477124

(cherry picked from commit bfd755ae)

Merge request reports