From d43d06604dc1991b4a5da75bb7d553261d902d7b Mon Sep 17 00:00:00 2001 From: apio Date: Wed, 16 Aug 2023 16:49:08 +0200 Subject: [PATCH] taskbar: Wait for terminated child windows --- apps/taskbar.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/taskbar.cpp b/apps/taskbar.cpp index 646262af..5d158581 100644 --- a/apps/taskbar.cpp +++ b/apps/taskbar.cpp @@ -1,15 +1,24 @@ #include +#include +#include #include #include #include #include #include +void sigchld_handler(int) +{ + wait(nullptr); +} + Result luna_main(int argc, char** argv) { ui::App app; TRY(app.init(argc, argv)); + signal(SIGCHLD, sigchld_handler); + ui::Rect screen = app.screen_rect(); ui::Rect bar = ui::Rect { ui::Point { 0, screen.height - 50 }, screen.width, 50 };