From 4d7cb99fb13f07423b81376f5c13033c369e8ed1 Mon Sep 17 00:00:00 2001 From: hippoz <10706925-hippoz@users.noreply.gitlab.com> Date: Wed, 27 Jul 2022 03:26:51 +0300 Subject: [PATCH] add on_after_layout --- src/Widget.cpp | 2 ++ src/Widget.hpp | 1 + 2 files changed, 3 insertions(+) diff --git a/src/Widget.cpp b/src/Widget.cpp index 41d8d31..a8f7174 100644 --- a/src/Widget.cpp +++ b/src/Widget.cpp @@ -202,6 +202,8 @@ void Widget::handle_relayout_subtree(RelayoutSubtreeEvent &event) { for (auto child : m_children) { child->dispatch_event(event); } + + on_after_layout(); } void Widget::handle_mouse_move_event(MouseMoveEvent &event) { diff --git a/src/Widget.hpp b/src/Widget.hpp index 92d3f9a..1fcb94f 100644 --- a/src/Widget.hpp +++ b/src/Widget.hpp @@ -119,6 +119,7 @@ protected: virtual void on_activation_update(ActivationUpdateEvent &event) {} virtual void on_paint() {} virtual void on_layout() {} + virtual void on_after_layout() {} void set_did_init(bool did_init) { m_did_init = did_init; } Point compute_window_relative();