diff --git a/rust_programs/libgui/src/window_axle.rs b/rust_programs/libgui/src/window_axle.rs index 5bc2dcfac..0f2f2189e 100644 --- a/rust_programs/libgui/src/window_axle.rs +++ b/rust_programs/libgui/src/window_axle.rs @@ -14,8 +14,8 @@ use agx_definitions::{ Drawable, Layer, LikeLayerSlice, NestedLayerSlice, Point, Rect, SingleFramebufferLayer, Size, }; use awm_messages::{ - AwmCreateWindow, AwmCreateWindowResponse, AwmWindowPartialRedraw, AwmWindowRedrawReady, - AwmWindowUpdateTitle, + AwmCloseWindow, AwmCreateWindow, AwmCreateWindowResponse, AwmWindowPartialRedraw, + AwmWindowRedrawReady, AwmWindowUpdateTitle, }; use crate::ui_elements::*; @@ -313,6 +313,8 @@ impl AwmWindow { fn window_close_requested(&self, event: &WindowCloseRequested) { printf!("Window close requested: {:?}\n", event); + // Ask awm to close the window on its end + amc_message_send(AwmWindow::AWM_SERVICE_NAME, AwmCloseWindow::new()); unsafe { axle_rt::libc::exit(0) } }