mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
xdg-dialog: add missing wm destroy signal
This commit is contained in:
parent
bcf8e467db
commit
b03b05d2b3
2 changed files with 4 additions and 0 deletions
|
|
@ -35,6 +35,7 @@ struct wlr_xdg_wm_dialog_v1 {
|
||||||
struct wl_global *global;
|
struct wl_global *global;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
struct wl_signal destroy;
|
||||||
struct wl_signal new_dialog; // struct wlr_xdg_dialog_v1
|
struct wl_signal new_dialog; // struct wlr_xdg_dialog_v1
|
||||||
} events;
|
} events;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -152,6 +152,8 @@ static void wm_bind(struct wl_client *client, void *data, uint32_t version, uint
|
||||||
|
|
||||||
static void xdg_wm_dialog_handle_display_destroy(struct wl_listener *listener, void *data) {
|
static void xdg_wm_dialog_handle_display_destroy(struct wl_listener *listener, void *data) {
|
||||||
struct wlr_xdg_wm_dialog_v1 *wm = wl_container_of(listener, wm, display_destroy);
|
struct wlr_xdg_wm_dialog_v1 *wm = wl_container_of(listener, wm, display_destroy);
|
||||||
|
wl_signal_emit_mutable(&wm->events.destroy, NULL);
|
||||||
|
|
||||||
wl_list_remove(&wm->display_destroy.link);
|
wl_list_remove(&wm->display_destroy.link);
|
||||||
wl_global_destroy(wm->global);
|
wl_global_destroy(wm->global);
|
||||||
free(wm);
|
free(wm);
|
||||||
|
|
@ -186,6 +188,7 @@ struct wlr_xdg_wm_dialog_v1 *wlr_xdg_wm_dialog_v1_create(struct wl_display *disp
|
||||||
wm->display_destroy.notify = xdg_wm_dialog_handle_display_destroy;
|
wm->display_destroy.notify = xdg_wm_dialog_handle_display_destroy;
|
||||||
wl_display_add_destroy_listener(display, &wm->display_destroy);
|
wl_display_add_destroy_listener(display, &wm->display_destroy);
|
||||||
|
|
||||||
|
wl_signal_init(&wm->events.destroy);
|
||||||
wl_signal_init(&wm->events.new_dialog);
|
wl_signal_init(&wm->events.new_dialog);
|
||||||
|
|
||||||
return wm;
|
return wm;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue