[PATCH weston 1/2] libweston-desktop: Rename _destroy_view to _unlink_view

Quentin Glidic sardemff7+wayland at sardemff7.net
Tue Aug 16 08:55:43 UTC 2016


From: Quentin Glidic <sardemff7+git at sardemff7.net>

It doesn't destroy the view per se (except for internal surfaces) and
require the caller to also destroy the view itself at the appropriate
time.

Signed-off-by: Quentin Glidic <sardemff7+git at sardemff7.net>
---
 desktop-shell/shell.c                 | 2 +-
 libweston-desktop/libweston-desktop.h | 2 +-
 libweston-desktop/surface.c           | 2 +-
 libweston-desktop/xwayland.c          | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 8023b0d..7bcaa8d 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -2364,7 +2364,7 @@ desktop_surface_removed(struct weston_desktop_surface *desktop_surface,
 	weston_desktop_surface_set_user_data(shsurf->desktop_surface, NULL);
 	shsurf->desktop_surface = NULL;
 
-	weston_desktop_surface_destroy_view(shsurf->view);
+	weston_desktop_surface_unlink_view(shsurf->view);
 	if (weston_surface_is_mapped(surface) &&
 	    shsurf->shell->win_close_animation_type == ANIMATION_FADE) {
 		pixman_region32_fini(&surface->pending.input);
diff --git a/libweston-desktop/libweston-desktop.h b/libweston-desktop/libweston-desktop.h
index 0f0e031..f77ab55 100644
--- a/libweston-desktop/libweston-desktop.h
+++ b/libweston-desktop/libweston-desktop.h
@@ -111,7 +111,7 @@ weston_desktop_surface_set_user_data(struct weston_desktop_surface *self,
 struct weston_view *
 weston_desktop_surface_create_view(struct weston_desktop_surface *surface);
 void
-weston_desktop_surface_destroy_view(struct weston_view *view);
+weston_desktop_surface_unlink_view(struct weston_view *view);
 void
 weston_desktop_surface_propagate_layer(struct weston_desktop_surface *surface);
 void
diff --git a/libweston-desktop/surface.c b/libweston-desktop/surface.c
index 42258db..2205107 100644
--- a/libweston-desktop/surface.c
+++ b/libweston-desktop/surface.c
@@ -404,7 +404,7 @@ weston_desktop_surface_create_view(struct weston_desktop_surface *surface)
 }
 
 WL_EXPORT void
-weston_desktop_surface_destroy_view(struct weston_view *wview)
+weston_desktop_surface_unlink_view(struct weston_view *wview)
 {
 	struct weston_desktop_surface *surface;
 	struct weston_desktop_view *view;
diff --git a/libweston-desktop/xwayland.c b/libweston-desktop/xwayland.c
index 6c63483..927afab 100644
--- a/libweston-desktop/xwayland.c
+++ b/libweston-desktop/xwayland.c
@@ -80,7 +80,7 @@ weston_desktop_xwayland_surface_change_state(struct weston_desktop_xwayland_surf
 
 	if (surface->state != state) {
 		if (surface->state == XWAYLAND) {
-			weston_desktop_surface_destroy_view(surface->view);
+			weston_desktop_surface_unlink_view(surface->view);
 			surface->view = NULL;
 		}
 
@@ -153,7 +153,7 @@ weston_desktop_xwayland_surface_destroy(struct weston_desktop_surface *dsurface,
 		weston_desktop_api_surface_removed(surface->desktop,
 						   surface->surface);
 	else if (surface->state == XWAYLAND)
-		weston_desktop_surface_destroy_view(surface->view);
+		weston_desktop_surface_unlink_view(surface->view);
 
 	free(surface);
 }
-- 
2.9.2



More information about the wayland-devel mailing list