window layouter: limit maximized size to client

This patch constraints the window size of the generated layout to the
minimum of the client's real window size and the wanted window size
(both may differ when resizing or maximizing windows).
This commit is contained in:
Norman Feske 2018-11-27 15:00:23 +01:00 committed by Christian Helmuth
parent 08bb689ae7
commit 4b4247f412
1 changed files with 2 additions and 2 deletions

View File

@ -366,8 +366,8 @@ class Window_layouter::Window : public List_model<Window>::Element
xml.attribute("xpos", rect.x1());
xml.attribute("ypos", rect.y1());
xml.attribute("width", rect.w());
xml.attribute("height", rect.h());
xml.attribute("width", min(rect.w(), _client_size.w()));
xml.attribute("height", min(rect.h(), _client_size.h()));
if (_focused)
xml.attribute("focused", "yes");