From 3accdb0e93eeb90898b3fd1b15e733163461d29b Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 5 Feb 2019 12:07:06 +0100 Subject: [PATCH] Handle WindowCloseRequest in FontEditor and /bin/guitest. --- FontEditor/main.cpp | 1 + Userland/guitest.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/FontEditor/main.cpp b/FontEditor/main.cpp index 84fc36977ce..99d71aa1323 100644 --- a/FontEditor/main.cpp +++ b/FontEditor/main.cpp @@ -29,6 +29,7 @@ int main(int argc, char** argv) auto* font_editor = new FontEditorWidget(path, move(edited_font)); font_editor->set_relative_rect({ 0, 0, 420, 200 }); window->set_main_widget(font_editor); + window->set_should_exit_app_on_close(true); window->show(); return loop.exec(); } diff --git a/Userland/guitest.cpp b/Userland/guitest.cpp index 882fe6c4dc2..314c999c126 100644 --- a/Userland/guitest.cpp +++ b/Userland/guitest.cpp @@ -66,6 +66,7 @@ int main(int argc, char** argv) case GUI_Event::Type::MouseMove: dbgprintf("WID=%x MouseMove %d,%d\n", event.window_id, event.mouse.position.x, event.mouse.position.y); break; case GUI_Event::Type::WindowActivated: dbgprintf("WID=%x WindowActivated\n", event.window_id); break; case GUI_Event::Type::WindowDeactivated: dbgprintf("WID=%x WindowDeactivated\n", event.window_id); break; + case GUI_Event::Type::WindowCloseRequest: return 0; } if (event.type == GUI_Event::Type::Paint) {