x11: Properly detect the case where client window moves inside frame window

If the window borders change in such a way that the buffer geometry
doesn't change, but the client geometry does change, we need to configure
the wrapper window and maybe the client window so there are no black
borders, etc.
This commit is contained in:
Vlad Zahorodnii 2021-05-28 08:19:23 +03:00
parent ce0edde906
commit c3978f197b

View file

@ -4109,7 +4109,12 @@ void X11Client::updateServerGeometry()
{
const QRect oldBufferGeometry = m_bufferGeometryBeforeUpdateBlocking;
if (oldBufferGeometry.size() != m_bufferGeometry.size()) {
// Compute the old client rect, the client geometry is always inside the buffer geometry.
QRect oldClientRect = m_clientGeometryBeforeUpdateBlocking;
oldClientRect.translate(-m_bufferGeometryBeforeUpdateBlocking.topLeft());
if (oldBufferGeometry.size() != m_bufferGeometry.size() ||
oldClientRect != QRect(clientPos(), clientSize())) {
resizeDecoration();
// If the client is being interactively resized, then the frame window, the wrapper window,
// and the client window have correct geometry at this point, so we don't have to configure