From d18f8eea2bf86c482b63aae273eb365e6c6b3be5 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 17 Jun 2019 14:38:47 +0200 Subject: [PATCH] window layouter: control maximize by editing rules This patch adds the missing propagation of the maximized state from the layout rules to the internal representation of a window. Without this patch this state could be toggled by clicking on the maximizer button only. --- repos/gems/src/app/window_layouter/assign.h | 2 ++ repos/gems/src/app/window_layouter/main.cc | 1 + 2 files changed, 3 insertions(+) diff --git a/repos/gems/src/app/window_layouter/assign.h b/repos/gems/src/app/window_layouter/assign.h index 41ee36cf8..7d30a047e 100644 --- a/repos/gems/src/app/window_layouter/assign.h +++ b/repos/gems/src/app/window_layouter/assign.h @@ -115,6 +115,8 @@ class Window_layouter::Assign : public List_model::Element return Rect(outer.p1() + target_geometry.p1(), outer.area()); } + bool maximized() const { return _maximized; } + /** * Call 'fn' with 'Registry' if label matches assignment * diff --git a/repos/gems/src/app/window_layouter/main.cc b/repos/gems/src/app/window_layouter/main.cc index 7cb8cacca..66ed89299 100644 --- a/repos/gems/src/app/window_layouter/main.cc +++ b/repos/gems/src/app/window_layouter/main.cc @@ -116,6 +116,7 @@ struct Window_layouter::Main : Operations, target.geometry(), _decorator_margins); member.window.outer_geometry(rect); + member.window.maximized(assign.maximized()); }); }); });