aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-09-28 13:34:22 +0200
committeremersion <contact@emersion.fr>2017-09-28 13:34:22 +0200
commit55d246218013afb8a0c75be852fbc22bca3bbcbd (patch)
tree80fab09285186077dd47a737e18e4d65c772b5b3
parent9d405cffa79d8de6378eca84fcd3881a5f68107c (diff)
Remove ping_timer when destroying wlr_wl_shell_surface
-rw-r--r--rootston/wl_shell.c2
-rw-r--r--types/wlr_wl_shell.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/rootston/wl_shell.c b/rootston/wl_shell.c
index 2b850d09..72725c7f 100644
--- a/rootston/wl_shell.c
+++ b/rootston/wl_shell.c
@@ -56,7 +56,7 @@ void handle_wl_shell_surface(struct wl_listener *listener, void *data) {
struct wlr_wl_shell_surface *surface = data;
wlr_log(L_DEBUG, "new shell surface: title=%s, class=%s",
surface->title, surface->class);
- wlr_wl_shell_surface_ping(surface); // TODO: segfaults
+ wlr_wl_shell_surface_ping(surface);
struct roots_wl_shell_surface *roots_surface =
calloc(1, sizeof(struct roots_wl_shell_surface));
diff --git a/types/wlr_wl_shell.c b/types/wlr_wl_shell.c
index 9283a635..23b14ad0 100644
--- a/types/wlr_wl_shell.c
+++ b/types/wlr_wl_shell.c
@@ -262,6 +262,7 @@ static void wl_shell_surface_destroy(struct wlr_wl_shell_surface *surface) {
wl_resource_set_user_data(surface->resource, NULL);
wl_list_remove(&surface->link);
wl_list_remove(&surface->surface_destroy_listener.link);
+ wl_event_source_remove(surface->ping_timer);
free(surface->transient_state);
free(surface->popup_state);
free(surface->title);