ladybird/Userland/Applications/Run/main.cpp

25 lines
671 B
C++
Raw Normal View History

2021-01-13 09:10:00 -03:00
/*
* Copyright (c) 2021, Nick Vella <nick@nxk.io>
*
* SPDX-License-Identifier: BSD-2-Clause
2021-01-13 09:10:00 -03:00
*/
#include "RunWindow.h"
2021-11-26 19:03:54 -03:00
#include <LibCore/System.h>
#include <LibGUI/Application.h>
#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
{
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();
}