mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +00:00
Handle WindowCloseRequest in FontEditor and /bin/guitest.
This commit is contained in:
parent
0a183df655
commit
3accdb0e93
Notes:
sideshowbarker
2024-07-19 15:51:31 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/3accdb0e93e
2 changed files with 2 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue