aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-09-27 23:47:39 +0200
committeremersion <contact@emersion.fr>2017-09-27 23:47:39 +0200
commitd6c6b7c506547d9d409e9c064dba9e613d14fc59 (patch)
treeef75fb719373c4029d1087b91d6ce48eb427eec2
parent241fec4d8786a0c86507d41f401ac70ec2c0c150 (diff)
class_ -> class, free more stuff in destroy_shell_surface
-rw-r--r--include/wlr/types/wlr_wl_shell.h2
-rw-r--r--rootston/wl_shell.c2
-rw-r--r--types/wlr_wl_shell.c14
3 files changed, 10 insertions, 8 deletions
diff --git a/include/wlr/types/wlr_wl_shell.h b/include/wlr/types/wlr_wl_shell.h
index 03c0da34..3d190588 100644
--- a/include/wlr/types/wlr_wl_shell.h
+++ b/include/wlr/types/wlr_wl_shell.h
@@ -51,7 +51,7 @@ struct wlr_wl_shell_surface {
struct wlr_wl_shell_surface_popup_state *popup_state;
char *title;
- char *class_;
+ char *class;
struct {
struct wl_signal destroy;
diff --git a/rootston/wl_shell.c b/rootston/wl_shell.c
index fffd9fc9..817d8b95 100644
--- a/rootston/wl_shell.c
+++ b/rootston/wl_shell.c
@@ -25,7 +25,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_);
+ surface->title, surface->class);
//wlr_wl_shell_surface_ping(surface); // TODO: segfaults
struct roots_wl_shell_surface *roots_surface =
diff --git a/types/wlr_wl_shell.c b/types/wlr_wl_shell.c
index e418b3d7..1384c995 100644
--- a/types/wlr_wl_shell.c
+++ b/types/wlr_wl_shell.c
@@ -245,17 +245,17 @@ static void shell_surface_set_title(struct wl_client *client,
}
static void shell_surface_set_class(struct wl_client *client,
- struct wl_resource *resource, const char *class_) {
- wlr_log(L_DEBUG, "new shell surface class: %s", class_);
+ struct wl_resource *resource, const char *class) {
+ wlr_log(L_DEBUG, "new shell surface class: %s", class);
struct wlr_wl_shell_surface *surface = wl_resource_get_user_data(resource);
- char *tmp = strdup(class_);
+ char *tmp = strdup(class);
if (tmp == NULL) {
return;
}
- free(surface->class_);
- surface->class_ = tmp;
+ free(surface->class);
+ surface->class = tmp;
wl_signal_emit(&surface->events.set_class, surface);
}
@@ -277,8 +277,10 @@ static void destroy_shell_surface(struct wl_resource *resource) {
struct wlr_wl_shell_surface *surface = wl_resource_get_user_data(resource);
wl_signal_emit(&surface->events.destroy, surface);
wl_list_remove(&surface->link);
+ free(surface->transient_state);
+ free(surface->popup_state);
free(surface->title);
- free(surface->class_);
+ free(surface->class);
free(surface);
}