Skip to content

Commit

Permalink
[libgui] Inform awm when self-closing
Browse files Browse the repository at this point in the history
  • Loading branch information
codyd51 committed Jan 1, 2023
1 parent 9ccb853 commit 8035bdc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rust_programs/libgui/src/window_axle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down Expand Up @@ -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) }
}

Expand Down

0 comments on commit 8035bdc

Please sign in to comment.