diff options
-rw-r--r-- | include/sway/tree/view.h | 2 | ||||
-rw-r--r-- | sway/desktop/xdg_shell.c | 4 | ||||
-rw-r--r-- | sway/desktop/xdg_shell_v6.c | 4 | ||||
-rw-r--r-- | sway/desktop/xwayland.c | 4 | ||||
-rw-r--r-- | sway/tree/view.c | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index 0e6f5292..1bcb0582 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h | |||
@@ -37,7 +37,7 @@ struct sway_view_impl { | |||
37 | void (*for_each_surface)(struct sway_view *view, | 37 | void (*for_each_surface)(struct sway_view *view, |
38 | wlr_surface_iterator_func_t iterator, void *user_data); | 38 | wlr_surface_iterator_func_t iterator, void *user_data); |
39 | void (*close)(struct sway_view *view); | 39 | void (*close)(struct sway_view *view); |
40 | void (*free)(struct sway_view *view); | 40 | void (*destroy)(struct sway_view *view); |
41 | }; | 41 | }; |
42 | 42 | ||
43 | struct sway_view { | 43 | struct sway_view { |
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index a06c3bd2..105e77ae 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c | |||
@@ -143,7 +143,7 @@ static void _close(struct sway_view *view) { | |||
143 | } | 143 | } |
144 | } | 144 | } |
145 | 145 | ||
146 | static void _free(struct sway_view *view) { | 146 | static void destroy(struct sway_view *view) { |
147 | struct sway_xdg_shell_view *xdg_shell_view = | 147 | struct sway_xdg_shell_view *xdg_shell_view = |
148 | xdg_shell_view_from_view(view); | 148 | xdg_shell_view_from_view(view); |
149 | if (xdg_shell_view == NULL) { | 149 | if (xdg_shell_view == NULL) { |
@@ -160,7 +160,7 @@ static const struct sway_view_impl view_impl = { | |||
160 | .wants_floating = wants_floating, | 160 | .wants_floating = wants_floating, |
161 | .for_each_surface = for_each_surface, | 161 | .for_each_surface = for_each_surface, |
162 | .close = _close, | 162 | .close = _close, |
163 | .free = _free, | 163 | .destroy = destroy, |
164 | }; | 164 | }; |
165 | 165 | ||
166 | static void handle_commit(struct wl_listener *listener, void *data) { | 166 | static void handle_commit(struct wl_listener *listener, void *data) { |
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c index 424bca7b..19b30604 100644 --- a/sway/desktop/xdg_shell_v6.c +++ b/sway/desktop/xdg_shell_v6.c | |||
@@ -143,7 +143,7 @@ static void _close(struct sway_view *view) { | |||
143 | } | 143 | } |
144 | } | 144 | } |
145 | 145 | ||
146 | static void _free(struct sway_view *view) { | 146 | static void destroy(struct sway_view *view) { |
147 | struct sway_xdg_shell_v6_view *xdg_shell_v6_view = | 147 | struct sway_xdg_shell_v6_view *xdg_shell_v6_view = |
148 | xdg_shell_v6_view_from_view(view); | 148 | xdg_shell_v6_view_from_view(view); |
149 | if (xdg_shell_v6_view == NULL) { | 149 | if (xdg_shell_v6_view == NULL) { |
@@ -160,7 +160,7 @@ static const struct sway_view_impl view_impl = { | |||
160 | .wants_floating = wants_floating, | 160 | .wants_floating = wants_floating, |
161 | .for_each_surface = for_each_surface, | 161 | .for_each_surface = for_each_surface, |
162 | .close = _close, | 162 | .close = _close, |
163 | .free = _free, | 163 | .destroy = destroy, |
164 | }; | 164 | }; |
165 | 165 | ||
166 | static void handle_commit(struct wl_listener *listener, void *data) { | 166 | static void handle_commit(struct wl_listener *listener, void *data) { |
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 53fa42cc..eea8420d 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c | |||
@@ -219,7 +219,7 @@ static void _close(struct sway_view *view) { | |||
219 | wlr_xwayland_surface_close(view->wlr_xwayland_surface); | 219 | wlr_xwayland_surface_close(view->wlr_xwayland_surface); |
220 | } | 220 | } |
221 | 221 | ||
222 | static void _free(struct sway_view *view) { | 222 | static void destroy(struct sway_view *view) { |
223 | struct sway_xwayland_view *xwayland_view = xwayland_view_from_view(view); | 223 | struct sway_xwayland_view *xwayland_view = xwayland_view_from_view(view); |
224 | if (xwayland_view == NULL) { | 224 | if (xwayland_view == NULL) { |
225 | return; | 225 | return; |
@@ -235,7 +235,7 @@ static const struct sway_view_impl view_impl = { | |||
235 | .set_fullscreen = set_fullscreen, | 235 | .set_fullscreen = set_fullscreen, |
236 | .wants_floating = wants_floating, | 236 | .wants_floating = wants_floating, |
237 | .close = _close, | 237 | .close = _close, |
238 | .free = _free, | 238 | .destroy = destroy, |
239 | }; | 239 | }; |
240 | 240 | ||
241 | static void handle_commit(struct wl_listener *listener, void *data) { | 241 | static void handle_commit(struct wl_listener *listener, void *data) { |
diff --git a/sway/tree/view.c b/sway/tree/view.c index 5a78112a..a616af03 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -51,8 +51,8 @@ void view_free(struct sway_view *view) { | |||
51 | wlr_texture_destroy(view->marks_unfocused); | 51 | wlr_texture_destroy(view->marks_unfocused); |
52 | wlr_texture_destroy(view->marks_urgent); | 52 | wlr_texture_destroy(view->marks_urgent); |
53 | 53 | ||
54 | if (view->impl->free) { | 54 | if (view->impl->destroy) { |
55 | view->impl->free(view); | 55 | view->impl->destroy(view); |
56 | } else { | 56 | } else { |
57 | free(view); | 57 | free(view); |
58 | } | 58 | } |