From bedbe3fed71b754b85cc005c120f6abfca639c89 Mon Sep 17 00:00:00 2001 From: Jente Hidskes Date: Wed, 30 Jan 2019 16:10:48 +0100 Subject: [PATCH] view: remove cg_ prefix --- seat.c | 2 +- view.c | 4 ++-- view.h | 5 +++-- xdg_shell.c | 2 +- xwayland.c | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/seat.c b/seat.c index 197a98b..da7a900 100644 --- a/seat.c +++ b/seat.c @@ -692,7 +692,7 @@ struct cg_view * seat_get_focus(struct cg_seat *seat) { struct wlr_surface *prev_surface = seat->seat->keyboard_state.focused_surface; - return cg_view_from_wlr_surface(seat->server, prev_surface); + return view_from_wlr_surface(seat->server, prev_surface); } void diff --git a/view.c b/view.c index aee4420..2b4fc69 100644 --- a/view.c +++ b/view.c @@ -160,7 +160,7 @@ view_destroy(struct cg_view *view) } struct cg_view * -cg_view_create(struct cg_server *server) +view_create(struct cg_server *server) { struct cg_view *view = calloc(1, sizeof(struct cg_view)); @@ -169,7 +169,7 @@ cg_view_create(struct cg_server *server) } struct cg_view * -cg_view_from_wlr_surface(struct cg_server *server, struct wlr_surface *surface) +view_from_wlr_surface(struct cg_server *server, struct wlr_surface *surface) { struct cg_view *view; wl_list_for_each(view, &server->views, link) { diff --git a/view.h b/view.h index 00e3f31..f6645b7 100644 --- a/view.h +++ b/view.h @@ -64,7 +64,8 @@ void view_position(struct cg_view *view); void view_unmap(struct cg_view *view); void view_map(struct cg_view *view, struct wlr_surface *surface); void view_destroy(struct cg_view *view); -struct cg_view *cg_view_create(struct cg_server *server); -struct cg_view *cg_view_from_wlr_surface(struct cg_server *server, struct wlr_surface *surface); +struct cg_view *view_create(struct cg_server *server); + +struct cg_view *view_from_wlr_surface(struct cg_server *server, struct wlr_surface *surface); #endif diff --git a/xdg_shell.c b/xdg_shell.c index 41ca898..93fa97f 100644 --- a/xdg_shell.c +++ b/xdg_shell.c @@ -110,7 +110,7 @@ handle_xdg_shell_surface_new(struct wl_listener *listener, void *data) return; } - struct cg_view *view = cg_view_create(server); + struct cg_view *view = view_create(server); view->type = CAGE_XDG_SHELL_VIEW; view->xdg_surface = xdg_surface; diff --git a/xwayland.c b/xwayland.c index 3ef86d5..03a75aa 100644 --- a/xwayland.c +++ b/xwayland.c @@ -102,7 +102,7 @@ handle_xwayland_surface_new(struct wl_listener *listener, void *data) struct cg_server *server = wl_container_of(listener, server, new_xwayland_surface); struct wlr_xwayland_surface *xwayland_surface = data; - struct cg_view *view = cg_view_create(server); + struct cg_view *view = view_create(server); view->type = CAGE_XWAYLAND_VIEW; view->xwayland_surface = xwayland_surface;