mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-28 21:37:28 -04:00
opt: cleanup commit listener for ext-workspace
This commit is contained in:
parent
9f1bbc6f70
commit
9d96116fe5
2 changed files with 6 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue