mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
MenuApplets: Use pledge()
This commit is contained in:
parent
457c7d9efd
commit
7b6b1bae02
Notes:
sideshowbarker
2024-07-19 10:10:24 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/7b6b1bae023
3 changed files with 32 additions and 0 deletions
|
@ -49,8 +49,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_has_alpha_channel(true);
|
||||
window->set_window_type(GWindowType::MenuApplet);
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <LibGUI/GPainter.h>
|
||||
#include <LibGUI/GWidget.h>
|
||||
#include <LibGUI/GWindow.h>
|
||||
#include <stdio.h>
|
||||
|
||||
class GraphWidget final : public GWidget {
|
||||
C_OBJECT(GraphWidget)
|
||||
|
@ -71,8 +72,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);
|
||||
window->resize(30, 16);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue