Skip to content

Replace AbstractClient::adjustedSize() with a simpler solution

Vlad Zahorodnii requested to merge work/zzag/kill-adjusted-size into master

Currently, adjustedSize() does two things - it computes and constrains the natural size of the window.

In many places where adjustedSize() is used, the natural size doesn't need to be constrained and in some it's actually undesired because AbstractClient::constrainClientSize() doesn't allow the client size to be 0x0, which can happen when dealing with a client that has no buffer committed yet.

This change replaces adjustedSize() with implicitSize(), which simply calculates the natural frame size based on the current client size.

If the frame size needs to be constrained, for example during interactive move-resize, use constrainFrameSize() or if you need to constrain the client size - constrainClientSize().

Merge request reports