2021-01-13 12:10:00 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2021, Nick Vella <nick@nxk.io>
|
|
|
|
*
|
2021-04-22 08:24:48 +00:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2021-01-13 12:10:00 +00:00
|
|
|
*/
|
|
|
|
|
2021-03-12 16:29:37 +00:00
|
|
|
#include "RunWindow.h"
|
2021-11-26 22:03:54 +00:00
|
|
|
#include <LibCore/System.h>
|
2021-01-21 19:23:52 +00:00
|
|
|
#include <LibGUI/Application.h>
|
2021-04-17 21:27:00 +00:00
|
|
|
#include <LibGUI/Desktop.h>
|
2021-11-26 22:03:54 +00:00
|
|
|
#include <LibMain/Main.h>
|
2021-01-13 12:10:00 +00:00
|
|
|
|
2021-11-26 22:03:54 +00:00
|
|
|
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
2021-01-13 12:10:00 +00:00
|
|
|
{
|
2021-11-27 22:26:34 +00:00
|
|
|
TRY(Core::System::pledge("stdio recvfd sendfd thread cpath rpath wpath unix proc exec"));
|
2021-01-13 12:10:00 +00:00
|
|
|
|
2023-05-05 04:24:53 +00:00
|
|
|
auto app = TRY(GUI::Application::create(arguments));
|
2024-01-30 20:54:20 +00:00
|
|
|
auto window = TRY(Run::RunWindow::try_create());
|
2021-01-13 12:10:00 +00:00
|
|
|
|
2023-05-21 22:41:18 +00:00
|
|
|
constexpr int margin = 16;
|
|
|
|
window->move_to(margin, GUI::Desktop::the().rect().bottom() - 1 - GUI::Desktop::the().taskbar_height() - margin - window->height());
|
2021-01-13 12:10:00 +00:00
|
|
|
window->show();
|
|
|
|
|
|
|
|
return app->exec();
|
|
|
|
}
|