mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
WorkspacePicker: Port to LibMain :^)
This commit is contained in:
parent
51484bec82
commit
24bf74a177
2 changed files with 8 additions and 14 deletions
|
@ -10,4 +10,4 @@ set(SOURCES
|
|||
)
|
||||
|
||||
serenity_bin(WorkspacePicker.Applet)
|
||||
target_link_libraries(WorkspacePicker.Applet LibGUI LibCore LibGfx)
|
||||
target_link_libraries(WorkspacePicker.Applet LibGUI LibCore LibGfx LibMain)
|
||||
|
|
|
@ -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
Reference in a new issue