aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-06-26 13:18:33 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-06-26 13:18:33 +1000
commit50190bc7609d981c45d26cd0b7d6d0fbf66feb05 (patch)
treed3999226eaf620bb729ba2c4b8d284549259ce8b /sway
parent7a922c65aab27c5f4282cf15de52d240e5ac8052 (diff)
downloadsway-50190bc7609d981c45d26cd0b7d6d0fbf66feb05.tar.xz
Rename view's free callback to destroy
Diffstat (limited to 'sway')
-rw-r--r--sway/desktop/xdg_shell.c4
-rw-r--r--sway/desktop/xdg_shell_v6.c4
-rw-r--r--sway/desktop/xwayland.c4
-rw-r--r--sway/tree/view.c4
4 files changed, 8 insertions, 8 deletions
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) {
}
}
-static void _free(struct sway_view *view) {
+static void destroy(struct sway_view *view) {
struct sway_xdg_shell_view *xdg_shell_view =
xdg_shell_view_from_view(view);
if (xdg_shell_view == NULL) {
@@ -160,7 +160,7 @@ static const struct sway_view_impl view_impl = {
.wants_floating = wants_floating,
.for_each_surface = for_each_surface,
.close = _close,
- .free = _free,
+ .destroy = destroy,
};
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) {
}
}
-static void _free(struct sway_view *view) {
+static void destroy(struct sway_view *view) {
struct sway_xdg_shell_v6_view *xdg_shell_v6_view =
xdg_shell_v6_view_from_view(view);
if (xdg_shell_v6_view == NULL) {
@@ -160,7 +160,7 @@ static const struct sway_view_impl view_impl = {
.wants_floating = wants_floating,
.for_each_surface = for_each_surface,
.close = _close,
- .free = _free,
+ .destroy = destroy,
};
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) {
wlr_xwayland_surface_close(view->wlr_xwayland_surface);
}
-static void _free(struct sway_view *view) {
+static void destroy(struct sway_view *view) {
struct sway_xwayland_view *xwayland_view = xwayland_view_from_view(view);
if (xwayland_view == NULL) {
return;
@@ -235,7 +235,7 @@ static const struct sway_view_impl view_impl = {
.set_fullscreen = set_fullscreen,
.wants_floating = wants_floating,
.close = _close,
- .free = _free,
+ .destroy = destroy,
};
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) {
wlr_texture_destroy(view->marks_unfocused);
wlr_texture_destroy(view->marks_urgent);
- if (view->impl->free) {
- view->impl->free(view);
+ if (view->impl->destroy) {
+ view->impl->destroy(view);
} else {
free(view);
}