File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -69,12 +69,14 @@ int main(int argc, char** argv)
69
69
return 1 ;
70
70
}
71
71
72
- if (unveil (" /res" , " r" ) < 0 ) {
73
- perror (" unveil" );
72
+ auto app = GUI::Application::construct (argc, argv);
73
+
74
+ if (pledge (" stdio shared_buffer rpath" , nullptr ) < 0 ) {
75
+ perror (" pledge" );
74
76
return 1 ;
75
77
}
76
78
77
- if (unveil (" /tmp " , " rwc " ) < 0 ) {
79
+ if (unveil (" /res " , " r " ) < 0 ) {
78
80
perror (" unveil" );
79
81
return 1 ;
80
82
}
@@ -86,8 +88,6 @@ int main(int argc, char** argv)
86
88
87
89
unveil (nullptr , nullptr );
88
90
89
- auto app = GUI::Application::construct (argc, argv);
90
-
91
91
auto window = GUI::Window::construct ();
92
92
window->set_title (" UserName" );
93
93
window->set_window_type (GUI::WindowType::MenuApplet);
@@ -96,10 +96,5 @@ int main(int argc, char** argv)
96
96
window->resize (widget.get_width (), 16 );
97
97
window->show ();
98
98
99
- if (pledge (" stdio shared_buffer rpath" , nullptr ) < 0 ) {
100
- perror (" pledge" );
101
- return 1 ;
102
- }
103
-
104
99
return app->exec ();
105
100
}
You can’t perform that action at this time.
0 commit comments