taskbar: Wait for terminated child windows
This commit is contained in:
parent
6375fb965a
commit
d43d06604d
@ -1,15 +1,24 @@
|
|||||||
#include <os/Process.h>
|
#include <os/Process.h>
|
||||||
|
#include <signal.h>
|
||||||
|
#include <sys/wait.h>
|
||||||
#include <ui/App.h>
|
#include <ui/App.h>
|
||||||
#include <ui/Button.h>
|
#include <ui/Button.h>
|
||||||
#include <ui/Container.h>
|
#include <ui/Container.h>
|
||||||
#include <ui/Image.h>
|
#include <ui/Image.h>
|
||||||
#include <ui/Layout.h>
|
#include <ui/Layout.h>
|
||||||
|
|
||||||
|
void sigchld_handler(int)
|
||||||
|
{
|
||||||
|
wait(nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
Result<int> luna_main(int argc, char** argv)
|
Result<int> luna_main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
ui::App app;
|
ui::App app;
|
||||||
TRY(app.init(argc, argv));
|
TRY(app.init(argc, argv));
|
||||||
|
|
||||||
|
signal(SIGCHLD, sigchld_handler);
|
||||||
|
|
||||||
ui::Rect screen = app.screen_rect();
|
ui::Rect screen = app.screen_rect();
|
||||||
|
|
||||||
ui::Rect bar = ui::Rect { ui::Point { 0, screen.height - 50 }, screen.width, 50 };
|
ui::Rect bar = ui::Rect { ui::Point { 0, screen.height - 50 }, screen.width, 50 };
|
||||||
|
Loading…
Reference in New Issue
Block a user