From 4b4247f41220c5227954c832f9d66b1a9e86c4e4 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 27 Nov 2018 15:00:23 +0100 Subject: [PATCH] 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). --- repos/gems/src/app/window_layouter/window.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/gems/src/app/window_layouter/window.h b/repos/gems/src/app/window_layouter/window.h index 2d6c574fc..2f89406ba 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");