From 1dd15950439f4027f6412bb3748f7f433e60924b Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 4 Jul 2020 14:05:19 +0200 Subject: LibGUI: Make GUI::Application a Core::Object Having this on the stack makes whole-program teardown iffy. Turning it into a Core::Object allows anyone who needs it to extends its lifetime. --- Demos/Eyes/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Demos/Eyes') diff --git a/Demos/Eyes/main.cpp b/Demos/Eyes/main.cpp index 32aecc2269..9058ec5657 100644 --- a/Demos/Eyes/main.cpp +++ b/Demos/Eyes/main.cpp @@ -42,7 +42,7 @@ int main(int argc, char* argv[]) return 1; } - GUI::Application app(argc, argv); + auto app = GUI::Application::construct(argc, argv); if (pledge("stdio shared_buffer accept rpath cpath wpath thread", nullptr) < 0) { perror("pledge"); @@ -58,5 +58,5 @@ int main(int argc, char* argv[]) window->show(); eyes.track_cursor_globally(); - return app.exec(); + return app->exec(); } -- cgit v1.2.3