diff --git a/repos/gems/src/app/window_layouter/window.h b/repos/gems/src/app/window_layouter/window.h index 2d6c574fcb..2f89406bab 100644 --- a/repos/gems/src/app/window_layouter/window.h +++ b/repos/gems/src/app/window_layouter/window.h @@ -366,8 +366,8 @@ class Window_layouter::Window : public List_model::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");