diff options
Diffstat (limited to 'Userland/Applications/Run/main.cpp')
-rw-r--r-- | Userland/Applications/Run/main.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Userland/Applications/Run/main.cpp b/Userland/Applications/Run/main.cpp index 82ef0ee165..207839b8ec 100644 --- a/Userland/Applications/Run/main.cpp +++ b/Userland/Applications/Run/main.cpp @@ -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(); |