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