1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:07:35 +00:00

Run: Port to LibMain :^)

This commit is contained in:
Andreas Kling 2021-11-26 23:03:54 +01:00
parent 0b8fb8358e
commit 1ded1ed963
2 changed files with 7 additions and 10 deletions

View file

@ -5,20 +5,17 @@
*/
#include "RunWindow.h"
#include <AK/StringBuilder.h>
#include <LibCore/System.h>
#include <LibGUI/Application.h>
#include <LibGUI/Desktop.h>
#include <unistd.h>
#include <LibMain/Main.h>
int main(int argc, char** argv)
ErrorOr<int> serenity_main(Main::Arguments arguments)
{
if (pledge("stdio recvfd sendfd thread cpath rpath wpath unix proc exec", nullptr) < 0) {
perror("pledge");
return 1;
}
TRY(Core::System::pledge("stdio recvfd sendfd thread cpath rpath wpath unix proc exec", nullptr));
auto app = GUI::Application::construct(argc, argv);
auto window = RunWindow::construct();
auto app = TRY(GUI::Application::try_create(arguments));
auto window = TRY(RunWindow::try_create());
window->move_to(16, GUI::Desktop::the().rect().bottom() - GUI::Desktop::the().taskbar_height() - 16 - window->height());
window->show();