Skip to content

Commit

Permalink
fix: wl_surface not destory if program not exit
Browse files Browse the repository at this point in the history
  • Loading branch information
Decodetalkers committed Feb 10, 2025
1 parent 6efc146 commit c2b976c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libwaysip/examples/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fn main() {
get_area(
Some(WaysipConnection {
connection: &connection,
globals
globals: &globals
}),
SelectionType::Area
)
Expand Down
3 changes: 3 additions & 0 deletions libwaysip/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,12 @@ fn get_area_inner(

layer_shell.destroy();
for surface in &state.wl_surfaces {
surface.layer.destroy();
surface.wl_surface.destroy();
surface.cursor_surface.destroy();
surface.buffer.destroy();
}
state.wl_surfaces.clear();
let _ = event_queue.roundtrip(&mut state);
Ok(state.area_info())
}

0 comments on commit c2b976c

Please sign in to comment.