diff --git a/src/ext-protocol/ext-workspace.h b/src/ext-protocol/ext-workspace.h index 631bebe8..658f509d 100644 --- a/src/ext-protocol/ext-workspace.h +++ b/src/ext-protocol/ext-workspace.h @@ -17,6 +17,10 @@ struct workspace { struct wlr_ext_workspace_manager_v1 *ext_manager; struct wl_list workspaces; +static void handle_ext_commit(struct wl_listener *listener, void *data); +static struct wl_listener ext_manager_commit_listener = {.notify = + handle_ext_commit}; + void goto_workspace(struct workspace *target) { uint32_t tag; tag = 1 << (target->tag - 1); @@ -203,7 +207,5 @@ void workspaces_init() { wl_list_init(&workspaces); - static struct wl_listener commit_listener; - commit_listener.notify = handle_ext_commit; - wl_signal_add(&ext_manager->events.commit, &commit_listener); + wl_signal_add(&ext_manager->events.commit, &ext_manager_commit_listener); } \ No newline at end of file diff --git a/src/mango.c b/src/mango.c index 148c37b6..1039a566 100644 --- a/src/mango.c +++ b/src/mango.c @@ -2468,6 +2468,7 @@ void setcursorshape(struct wl_listener *listener, void *data) { } void cleanuplisteners(void) { + wl_list_remove(&ext_manager_commit_listener.link); // 0.7 wl_list_remove(&print_status_listener.link); wl_list_remove(&cursor_axis.link); wl_list_remove(&cursor_button.link);