mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 17:44:56 +09:00
Maps: Add pledge and unveils
This commit is contained in:
parent
52d6c49ccc
commit
b21ca0d04e
Notes:
sideshowbarker
2024-07-17 07:31:31 +09:00
Author: https://github.com/gmta
Commit: b21ca0d04e
Pull-request: https://github.com/SerenityOS/serenity/pull/20959
1 changed files with 9 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "MapWidget.h"
|
||||
#include <LibConfig/Client.h>
|
||||
#include <LibCore/System.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
|
@ -14,7 +15,15 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath unix"));
|
||||
|
||||
auto app = TRY(GUI::Application::create(arguments));
|
||||
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil("/tmp/session/%sid/portal/config", "rw"));
|
||||
TRY(Core::System::unveil("/tmp/session/%sid/portal/request", "rw"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-maps"sv));
|
||||
auto window = TRY(GUI::Window::try_create());
|
||||
window->set_title("Maps");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue