mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 23:52:07 +00:00
WorkspacePicker: Port to LibMain :^)
This commit is contained in:
parent
51484bec82
commit
24bf74a177
2 changed files with 8 additions and 14 deletions
|
@ -5,31 +5,25 @@
|
|||
*/
|
||||
|
||||
#include "DesktopStatusWindow.h"
|
||||
#include <LibCore/System.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/WindowManagerServerConnection.h>
|
||||
#include <LibMain/Main.h>
|
||||
#include <WindowServer/Window.h>
|
||||
#include <serenity.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
if (pledge("stdio recvfd sendfd rpath unix", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath unix", nullptr));
|
||||
|
||||
auto app = GUI::Application::construct(argc, argv);
|
||||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
|
||||
// We need to obtain the WM connection here as well before the pledge shortening.
|
||||
GUI::WindowManagerServerConnection::the();
|
||||
|
||||
if (pledge("stdio recvfd sendfd rpath", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath", nullptr));
|
||||
|
||||
auto window = DesktopStatusWindow::construct();
|
||||
auto window = TRY(DesktopStatusWindow::try_create());
|
||||
window->set_title("WorkspacePicker");
|
||||
window->resize(28, 16);
|
||||
window->show();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue