1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:38:12 +00:00

MenuApplets: Use pledge()

This commit is contained in:
Andreas Kling 2020-01-11 21:18:40 +01:00
parent 457c7d9efd
commit 7b6b1bae02
3 changed files with 32 additions and 0 deletions

View file

@ -4,6 +4,7 @@
#include <LibGUI/GPainter.h>
#include <LibGUI/GWidget.h>
#include <LibGUI/GWindow.h>
#include <stdio.h>
#include <time.h>
class ClockWidget final : public GWidget {
@ -63,8 +64,18 @@ private:
int main(int argc, char** argv)
{
if (pledge("stdio shared_buffer rpath unix cpath fattr", nullptr) < 0) {
perror("pledge");
return 1;
}
GApplication app(argc, argv);
if (pledge("stdio shared_buffer rpath unix", nullptr) < 0) {
perror("pledge");
return 1;
}
auto window = GWindow::construct();
window->set_window_type(GWindowType::MenuApplet);