mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:37:44 +00:00
Calculator: Use unveil()
A barebones GUI app like this only needs read access to /res (for fonts and themes, in case settings change) once it's up and running.
This commit is contained in:
parent
1b3cac2f42
commit
39931733a5
1 changed files with 7 additions and 0 deletions
|
@ -47,6 +47,13 @@ int main(int argc, char** argv)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (unveil("/res", "r") < 0) {
|
||||||
|
perror("unveil");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
unveil(nullptr, nullptr);
|
||||||
|
|
||||||
auto window = GWindow::construct();
|
auto window = GWindow::construct();
|
||||||
window->set_title("Calculator");
|
window->set_title("Calculator");
|
||||||
window->set_resizable(false);
|
window->set_resizable(false);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue