Skip to content

Commit

Permalink
Merge branch 'main' into root-menu-path
Browse files Browse the repository at this point in the history
  • Loading branch information
phkaeser committed Mar 7, 2025
2 parents e398a36 + aad2772 commit e4130bc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion doc/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Support for visual effects to improve usability, but not for pure show.
* [done] preliminary support for keyboard interactivity.

* Bug fixes
* Fix crash when closing a shaded window.
* [done] Fix crash when closing a shaded window.

## [0.4](https://github.com/phkaeser/wlmaker/releases/tag/v0.4)

Expand Down
3 changes: 3 additions & 0 deletions src/tl_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ wlmaker_tl_menu_t *wlmaker_tl_menu_create(
/* ------------------------------------------------------------------------- */
void wlmaker_tl_menu_destroy(wlmaker_tl_menu_t *tl_menu_ptr)
{
wlmtk_util_disconnect_listener(
&tl_menu_ptr->window_state_changed_listener);

free(tl_menu_ptr);
}

Expand Down
11 changes: 6 additions & 5 deletions src/xdg_toplevel.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,6 @@ void xdg_toplevel_surface_destroy(
wl_list_remove(&xts_ptr->new_popup_listener.link);
wl_list_remove(&xts_ptr->destroy_listener.link);

if (NULL != xdg_tl_surface_ptr->tl_menu_ptr) {
wlmaker_tl_menu_destroy(xdg_tl_surface_ptr->tl_menu_ptr);
xdg_tl_surface_ptr->tl_menu_ptr = NULL;
}

wlmtk_content_fini(&xts_ptr->super_content);

if (NULL != xdg_tl_surface_ptr->surface_ptr) {
Expand Down Expand Up @@ -437,6 +432,12 @@ void handle_destroy(struct wl_listener *listener_ptr,
wl_signal_emit(
&xdg_tl_surface_ptr->server_ptr->window_destroyed_event,
xdg_tl_surface_ptr->super_content.window_ptr);

if (NULL != xdg_tl_surface_ptr->tl_menu_ptr) {
wlmaker_tl_menu_destroy(xdg_tl_surface_ptr->tl_menu_ptr);
xdg_tl_surface_ptr->tl_menu_ptr = NULL;
}

wlmtk_window_destroy(xdg_tl_surface_ptr->super_content.window_ptr);
xdg_toplevel_surface_destroy(xdg_tl_surface_ptr);
}
Expand Down

0 comments on commit e4130bc

Please sign in to comment.