Skip to content

Make setFrameGeometry() re-entrant for X and internal clients

Vlad Zahorodnii requested to merge work/re-entrant-set-frame-geometry into master

If AbstractClient::setFrameGeometry() is called from a slot connected directly to the frameGeometryChanged() signal, then is there a good chance that kwin will fall into an infinite recursion. However, that's the case with only X11 and internal clients.

The root cause of the infinite recursion is that both X11Client and InternalClient compare the new geometry against the geometry before update blocking. In order to fix the bug, we simply need to ensure that updateGeometryBeforeUpdateBlocking() has been called before we start emitting the frameGeometryChanged() signal.

Furthermore, a couple of tests were added to ensure that we won't hit this subtle bug again.

Merge request reports

Loading