|
|
@ -1250,6 +1250,12 @@ static void xdg_shell_bind(struct wl_client *wl_client, void *data,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
|
|
|
|
|
|
|
struct wlr_xdg_shell_v6 *xdg_shell =
|
|
|
|
|
|
|
|
wl_container_of(listener, xdg_shell, display_destroy);
|
|
|
|
|
|
|
|
wlr_xdg_shell_v6_destroy(xdg_shell);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
struct wlr_xdg_shell_v6 *wlr_xdg_shell_v6_create(struct wl_display *display) {
|
|
|
|
struct wlr_xdg_shell_v6 *wlr_xdg_shell_v6_create(struct wl_display *display) {
|
|
|
|
struct wlr_xdg_shell_v6 *xdg_shell =
|
|
|
|
struct wlr_xdg_shell_v6 *xdg_shell =
|
|
|
|
calloc(1, sizeof(struct wlr_xdg_shell_v6));
|
|
|
|
calloc(1, sizeof(struct wlr_xdg_shell_v6));
|
|
|
@ -1272,6 +1278,9 @@ struct wlr_xdg_shell_v6 *wlr_xdg_shell_v6_create(struct wl_display *display) {
|
|
|
|
|
|
|
|
|
|
|
|
wl_signal_init(&xdg_shell->events.new_surface);
|
|
|
|
wl_signal_init(&xdg_shell->events.new_surface);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
xdg_shell->display_destroy.notify = handle_display_destroy;
|
|
|
|
|
|
|
|
wl_display_add_destroy_listener(display, &xdg_shell->display_destroy);
|
|
|
|
|
|
|
|
|
|
|
|
return xdg_shell;
|
|
|
|
return xdg_shell;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1279,8 +1288,8 @@ void wlr_xdg_shell_v6_destroy(struct wlr_xdg_shell_v6 *xdg_shell) {
|
|
|
|
if (!xdg_shell) {
|
|
|
|
if (!xdg_shell) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// TODO: this segfault (wl_display->registry_resource_list is not init)
|
|
|
|
wl_list_remove(&xdg_shell->display_destroy.link);
|
|
|
|
// wl_global_destroy(xdg_shell->wl_global);
|
|
|
|
wl_global_destroy(xdg_shell->wl_global);
|
|
|
|
free(xdg_shell);
|
|
|
|
free(xdg_shell);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|