From 56ff5527baf93c68fe54001dec1927e714e8bd8b Mon Sep 17 00:00:00 2001 From: Savanni D'Gerinel Date: Mon, 19 Feb 2024 09:49:20 -0500 Subject: [PATCH] Quit the application when the user clicks the header bar X --- fitnesstrax/app/src/app_window.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fitnesstrax/app/src/app_window.rs b/fitnesstrax/app/src/app_window.rs index 0a127c4..fcc1cdf 100644 --- a/fitnesstrax/app/src/app_window.rs +++ b/fitnesstrax/app/src/app_window.rs @@ -56,6 +56,10 @@ impl AppWindow { .width_request(800) .height_request(746) .build(); + window.connect_destroy({ + let adw_app = adw_app.clone(); + move |_| adw_app.quit() + }); let stylesheet = String::from_utf8( resources_lookup_data(