diff options
author | emersion <contact@emersion.fr> | 2018-05-14 19:16:46 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-05-14 19:16:46 +0100 |
commit | c7480d50847d988b124c0cac458dd992c3ed6f38 (patch) | |
tree | 8b427922cfdf8ab3c7b90daba66d8cc6c5f5e17d | |
parent | 1e5b5d15a6da6e414ee4dec832d7d4a80e74f71e (diff) |
xdg-shell-v6: rename shared private functions to prevent conflicts with xdg-shell stable
-rw-r--r-- | include/types/wlr_xdg_shell_v6.h | 36 | ||||
-rw-r--r-- | types/xdg_shell_v6/wlr_xdg_popup_v6.c | 20 | ||||
-rw-r--r-- | types/xdg_shell_v6/wlr_xdg_positioner_v6.c | 18 | ||||
-rw-r--r-- | types/xdg_shell_v6/wlr_xdg_shell_v6.c | 4 | ||||
-rw-r--r-- | types/xdg_shell_v6/wlr_xdg_surface_v6.c | 42 | ||||
-rw-r--r-- | types/xdg_shell_v6/wlr_xdg_toplevel_v6.c | 30 |
6 files changed, 75 insertions, 75 deletions
diff --git a/include/types/wlr_xdg_shell_v6.h b/include/types/wlr_xdg_shell_v6.h index 6c440529..b5325998 100644 --- a/include/types/wlr_xdg_shell_v6.h +++ b/include/types/wlr_xdg_shell_v6.h @@ -10,36 +10,36 @@ struct wlr_xdg_positioner_v6_resource { struct wlr_xdg_positioner_v6 attrs; }; -#define XDG_TOPLEVEL_ROLE "xdg_toplevel_v6" -#define XDG_POPUP_ROLE "xdg_popup_v6" +#define XDG_TOPLEVEL_V6_ROLE "xdg_toplevel_v6" +#define XDG_POPUP_V6_ROLE "xdg_popup_v6" -uint32_t xdg_surface_v6_schedule_configure(struct wlr_xdg_surface_v6 *surface); -struct wlr_xdg_surface_v6 *xdg_surface_v6_create( +uint32_t schedule_xdg_surface_v6_configure(struct wlr_xdg_surface_v6 *surface); +struct wlr_xdg_surface_v6 *create_xdg_surface_v6( struct wlr_xdg_client_v6 *client, struct wlr_surface *surface, uint32_t id); -void xdg_surface_unmap(struct wlr_xdg_surface_v6 *surface); -void xdg_surface_destroy(struct wlr_xdg_surface_v6 *surface); +void unmap_xdg_surface_v6(struct wlr_xdg_surface_v6 *surface); +void destroy_xdg_surface_v6(struct wlr_xdg_surface_v6 *surface); -void xdg_positioner_v6_create(struct wlr_xdg_client_v6 *client, uint32_t id); -struct wlr_xdg_positioner_v6_resource *xdg_positioner_from_resource( +void create_xdg_positioner_v6(struct wlr_xdg_client_v6 *client, uint32_t id); +struct wlr_xdg_positioner_v6_resource *get_xdg_positioner_v6_from_resource( struct wl_resource *resource); -void xdg_popup_v6_create(struct wlr_xdg_surface_v6 *xdg_surface, +void create_xdg_popup_v6(struct wlr_xdg_surface_v6 *xdg_surface, struct wlr_xdg_surface_v6 *parent, struct wlr_xdg_positioner_v6_resource *positioner, int32_t id); -void xdg_surface_v6_popup_committed(struct wlr_xdg_surface_v6 *surface); -struct wlr_xdg_popup_grab_v6 *xdg_shell_popup_grab_from_seat( +void handle_xdg_surface_v6_popup_committed(struct wlr_xdg_surface_v6 *surface); +struct wlr_xdg_popup_grab_v6 *get_xdg_shell_v6_popup_grab_from_seat( struct wlr_xdg_shell_v6 *shell, struct wlr_seat *seat); -void xdg_popup_destroy(struct wlr_xdg_surface_v6 *surface); +void destroy_xdg_popup_v6(struct wlr_xdg_surface_v6 *surface); -void xdg_toplevel_v6_create(struct wlr_xdg_surface_v6 *xdg_surface, +void create_xdg_toplevel_v6(struct wlr_xdg_surface_v6 *xdg_surface, uint32_t id); -void xdg_surface_v6_toplevel_committed(struct wlr_xdg_surface_v6 *surface); -void xdg_toplevel_v6_send_configure(struct wlr_xdg_surface_v6 *surface, +void handle_xdg_surface_v6_toplevel_committed(struct wlr_xdg_surface_v6 *surface); +void send_xdg_toplevel_v6_configure(struct wlr_xdg_surface_v6 *surface, struct wlr_xdg_surface_v6_configure *configure); -void xdg_toplevel_v6_ack_configure(struct wlr_xdg_surface_v6 *surface, +void handle_xdg_toplevel_v6_ack_configure(struct wlr_xdg_surface_v6 *surface, struct wlr_xdg_surface_v6_configure *configure); -bool xdg_surface_v6_toplevel_state_compare(struct wlr_xdg_toplevel_v6 *state); -void xdg_toplevel_destroy(struct wlr_xdg_surface_v6 *surface); +bool compare_xdg_surface_v6_toplevel_state(struct wlr_xdg_toplevel_v6 *state); +void destroy_xdg_toplevel_v6(struct wlr_xdg_surface_v6 *surface); #endif diff --git a/types/xdg_shell_v6/wlr_xdg_popup_v6.c b/types/xdg_shell_v6/wlr_xdg_popup_v6.c index 9bd996b8..a75201d0 100644 --- a/types/xdg_shell_v6/wlr_xdg_popup_v6.c +++ b/types/xdg_shell_v6/wlr_xdg_popup_v6.c @@ -107,14 +107,14 @@ static void xdg_popup_grab_handle_seat_destroy( struct wlr_xdg_popup_v6 *popup, *next; wl_list_for_each_safe(popup, next, &xdg_grab->popups, grab_link) { - xdg_surface_destroy(popup->base); + destroy_xdg_surface_v6(popup->base); } wl_list_remove(&xdg_grab->link); free(xdg_grab); } -struct wlr_xdg_popup_grab_v6 *xdg_shell_popup_grab_from_seat( +struct wlr_xdg_popup_grab_v6 *get_xdg_shell_v6_popup_grab_from_seat( struct wlr_xdg_shell_v6 *shell, struct wlr_seat *seat) { struct wlr_xdg_popup_grab_v6 *xdg_grab; wl_list_for_each(xdg_grab, &shell->popup_grabs, link) { @@ -154,9 +154,9 @@ static struct wlr_xdg_surface_v6 *xdg_surface_from_xdg_popup_resource( return wl_resource_get_user_data(resource); } -void xdg_popup_destroy(struct wlr_xdg_surface_v6 *surface) { +void destroy_xdg_popup_v6(struct wlr_xdg_surface_v6 *surface) { assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_POPUP); - xdg_surface_unmap(surface); + unmap_xdg_surface_v6(surface); wl_resource_set_user_data(surface->popup->resource, NULL); wl_list_remove(&surface->popup->link); @@ -182,7 +182,7 @@ static void xdg_popup_handle_grab(struct wl_client *client, } struct wlr_xdg_popup_grab_v6 *popup_grab = - xdg_shell_popup_grab_from_seat(surface->client->shell, + get_xdg_shell_v6_popup_grab_from_seat(surface->client->shell, seat_client->seat); struct wlr_xdg_surface_v6 *topmost = xdg_popup_grab_get_topmost(popup_grab); @@ -232,20 +232,20 @@ static void xdg_popup_handle_resource_destroy(struct wl_resource *resource) { struct wlr_xdg_surface_v6 *surface = xdg_surface_from_xdg_popup_resource(resource); if (surface != NULL) { - xdg_popup_destroy(surface); + destroy_xdg_popup_v6(surface); } } -void xdg_surface_v6_popup_committed(struct wlr_xdg_surface_v6 *surface) { +void handle_xdg_surface_v6_popup_committed(struct wlr_xdg_surface_v6 *surface) { assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_POPUP); if (!surface->popup->committed) { - xdg_surface_v6_schedule_configure(surface); + schedule_xdg_surface_v6_configure(surface); surface->popup->committed = true; } } -void xdg_popup_v6_create(struct wlr_xdg_surface_v6 *xdg_surface, +void create_xdg_popup_v6(struct wlr_xdg_surface_v6 *xdg_surface, struct wlr_xdg_surface_v6 *parent, struct wlr_xdg_positioner_v6_resource *positioner, int32_t id) { if (positioner->attrs.size.width == 0 || @@ -256,7 +256,7 @@ void xdg_popup_v6_create(struct wlr_xdg_surface_v6 *xdg_surface, return; } - if (wlr_surface_set_role(xdg_surface->surface, XDG_POPUP_ROLE, + if (wlr_surface_set_role(xdg_surface->surface, XDG_POPUP_V6_ROLE, xdg_surface->resource, ZXDG_SHELL_V6_ERROR_ROLE)) { return; } diff --git a/types/xdg_shell_v6/wlr_xdg_positioner_v6.c b/types/xdg_shell_v6/wlr_xdg_positioner_v6.c index 1d8e80e2..837f9290 100644 --- a/types/xdg_shell_v6/wlr_xdg_positioner_v6.c +++ b/types/xdg_shell_v6/wlr_xdg_positioner_v6.c @@ -5,7 +5,7 @@ static const struct zxdg_positioner_v6_interface zxdg_positioner_v6_implementation; -struct wlr_xdg_positioner_v6_resource *xdg_positioner_from_resource( +struct wlr_xdg_positioner_v6_resource *get_xdg_positioner_v6_from_resource( struct wl_resource *resource) { assert(wl_resource_instance_of(resource, &zxdg_positioner_v6_interface, &zxdg_positioner_v6_implementation)); @@ -14,7 +14,7 @@ struct wlr_xdg_positioner_v6_resource *xdg_positioner_from_resource( static void xdg_positioner_destroy(struct wl_resource *resource) { struct wlr_xdg_positioner_v6_resource *positioner = - xdg_positioner_from_resource(resource); + get_xdg_positioner_v6_from_resource(resource); free(positioner); } @@ -26,7 +26,7 @@ static void xdg_positioner_handle_destroy(struct wl_client *client, static void xdg_positioner_handle_set_size(struct wl_client *client, struct wl_resource *resource, int32_t width, int32_t height) { struct wlr_xdg_positioner_v6_resource *positioner = - xdg_positioner_from_resource(resource); + get_xdg_positioner_v6_from_resource(resource); if (width < 1 || height < 1) { wl_resource_post_error(resource, @@ -43,7 +43,7 @@ static void xdg_positioner_handle_set_anchor_rect(struct wl_client *client, struct wl_resource *resource, int32_t x, int32_t y, int32_t width, int32_t height) { struct wlr_xdg_positioner_v6_resource *positioner = - xdg_positioner_from_resource(resource); + get_xdg_positioner_v6_from_resource(resource); if (width < 1 || height < 1) { wl_resource_post_error(resource, @@ -61,7 +61,7 @@ static void xdg_positioner_handle_set_anchor_rect(struct wl_client *client, static void xdg_positioner_handle_set_anchor(struct wl_client *client, struct wl_resource *resource, uint32_t anchor) { struct wlr_xdg_positioner_v6_resource *positioner = - xdg_positioner_from_resource(resource); + get_xdg_positioner_v6_from_resource(resource); if (((anchor & ZXDG_POSITIONER_V6_ANCHOR_TOP ) && (anchor & ZXDG_POSITIONER_V6_ANCHOR_BOTTOM)) || @@ -79,7 +79,7 @@ static void xdg_positioner_handle_set_anchor(struct wl_client *client, static void xdg_positioner_handle_set_gravity(struct wl_client *client, struct wl_resource *resource, uint32_t gravity) { struct wlr_xdg_positioner_v6_resource *positioner = - xdg_positioner_from_resource(resource); + get_xdg_positioner_v6_from_resource(resource); if (((gravity & ZXDG_POSITIONER_V6_GRAVITY_TOP) && (gravity & ZXDG_POSITIONER_V6_GRAVITY_BOTTOM)) || @@ -98,7 +98,7 @@ static void xdg_positioner_handle_set_constraint_adjustment( struct wl_client *client, struct wl_resource *resource, uint32_t constraint_adjustment) { struct wlr_xdg_positioner_v6_resource *positioner = - xdg_positioner_from_resource(resource); + get_xdg_positioner_v6_from_resource(resource); positioner->attrs.constraint_adjustment = constraint_adjustment; } @@ -106,7 +106,7 @@ static void xdg_positioner_handle_set_constraint_adjustment( static void xdg_positioner_handle_set_offset(struct wl_client *client, struct wl_resource *resource, int32_t x, int32_t y) { struct wlr_xdg_positioner_v6_resource *positioner = - xdg_positioner_from_resource(resource); + get_xdg_positioner_v6_from_resource(resource); positioner->attrs.offset.x = x; positioner->attrs.offset.y = y; @@ -213,7 +213,7 @@ void wlr_positioner_v6_invert_y( } } -void xdg_positioner_v6_create(struct wlr_xdg_client_v6 *client, uint32_t id) { +void create_xdg_positioner_v6(struct wlr_xdg_client_v6 *client, uint32_t id) { struct wlr_xdg_positioner_v6_resource *positioner = calloc(1, sizeof(struct wlr_xdg_positioner_v6_resource)); if (positioner == NULL) { diff --git a/types/xdg_shell_v6/wlr_xdg_shell_v6.c b/types/xdg_shell_v6/wlr_xdg_shell_v6.c index 568b6979..3fbe28b2 100644 --- a/types/xdg_shell_v6/wlr_xdg_shell_v6.c +++ b/types/xdg_shell_v6/wlr_xdg_shell_v6.c @@ -18,7 +18,7 @@ static void xdg_shell_handle_create_positioner(struct wl_client *wl_client, struct wl_resource *resource, uint32_t id) { struct wlr_xdg_client_v6 *client = xdg_client_from_resource(resource); - xdg_positioner_v6_create(client, id); + create_xdg_positioner_v6(client, id); } static void xdg_shell_handle_get_xdg_surface(struct wl_client *wl_client, @@ -27,7 +27,7 @@ static void xdg_shell_handle_get_xdg_surface(struct wl_client *wl_client, struct wlr_xdg_client_v6 *client = xdg_client_from_resource(client_resource); struct wlr_surface *surface = wlr_surface_from_resource(surface_resource); - xdg_surface_v6_create(client, surface, id); + create_xdg_surface_v6(client, surface, id); } static void xdg_shell_handle_pong(struct wl_client *wl_client, diff --git a/types/xdg_shell_v6/wlr_xdg_surface_v6.c b/types/xdg_shell_v6/wlr_xdg_surface_v6.c index 47bfecc2..a1214a0a 100644 --- a/types/xdg_shell_v6/wlr_xdg_surface_v6.c +++ b/types/xdg_shell_v6/wlr_xdg_surface_v6.c @@ -7,8 +7,8 @@ bool wlr_surface_is_xdg_surface_v6(struct wlr_surface *surface) { return surface->role != NULL && - (strcmp(surface->role, XDG_TOPLEVEL_ROLE) == 0 || - strcmp(surface->role, XDG_POPUP_ROLE) == 0); + (strcmp(surface->role, XDG_TOPLEVEL_V6_ROLE) == 0 || + strcmp(surface->role, XDG_POPUP_V6_ROLE) == 0); } struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6_from_wlr_surface( @@ -36,7 +36,7 @@ static void xdg_surface_configure_destroy( free(configure); } -void xdg_surface_unmap(struct wlr_xdg_surface_v6 *surface) { +void unmap_xdg_surface_v6(struct wlr_xdg_surface_v6 *surface) { assert(surface->role != WLR_XDG_SURFACE_V6_ROLE_NONE); // TODO: probably need to ungrab before this event @@ -54,7 +54,7 @@ void xdg_surface_unmap(struct wlr_xdg_surface_v6 *surface) { case WLR_XDG_SURFACE_V6_ROLE_POPUP: if (surface->popup->seat != NULL) { struct wlr_xdg_popup_grab_v6 *grab = - xdg_shell_popup_grab_from_seat(surface->client->shell, + get_xdg_shell_v6_popup_grab_from_seat(surface->client->shell, surface->popup->seat); wl_list_remove(&surface->popup->grab_link); @@ -93,19 +93,19 @@ void xdg_surface_unmap(struct wlr_xdg_surface_v6 *surface) { memset(&surface->next_geometry, 0, sizeof(struct wlr_box)); } -void xdg_surface_destroy(struct wlr_xdg_surface_v6 *surface) { +void destroy_xdg_surface_v6(struct wlr_xdg_surface_v6 *surface) { if (surface->role != WLR_XDG_SURFACE_V6_ROLE_NONE) { - xdg_surface_unmap(surface); + unmap_xdg_surface_v6(surface); } wlr_signal_emit_safe(&surface->events.destroy, surface); switch (surface->role) { case WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL: - xdg_toplevel_destroy(surface); + destroy_xdg_toplevel_v6(surface); break; case WLR_XDG_SURFACE_V6_ROLE_POPUP: - xdg_popup_destroy(surface); + destroy_xdg_popup_v6(surface); break; case WLR_XDG_SURFACE_V6_ROLE_NONE: // This space is intentionally left blank @@ -122,7 +122,7 @@ void xdg_surface_destroy(struct wlr_xdg_surface_v6 *surface) { static void xdg_surface_handle_get_toplevel(struct wl_client *client, struct wl_resource *resource, uint32_t id) { struct wlr_xdg_surface_v6 *xdg_surface = xdg_surface_from_resource(resource); - xdg_toplevel_v6_create(xdg_surface, id); + create_xdg_toplevel_v6(xdg_surface, id); } static void xdg_surface_handle_get_popup(struct wl_client *wl_client, @@ -134,9 +134,9 @@ static void xdg_surface_handle_get_popup(struct wl_client *wl_client, struct wlr_xdg_surface_v6 *parent = xdg_surface_from_resource(parent_resource); struct wlr_xdg_positioner_v6_resource *positioner = - xdg_positioner_from_resource(positioner_resource); + get_xdg_positioner_v6_from_resource(positioner_resource); - xdg_popup_v6_create(xdg_surface, parent, positioner, id); + create_xdg_popup_v6(xdg_surface, parent, positioner, id); } static void xdg_surface_handle_ack_configure(struct wl_client *client, @@ -174,7 +174,7 @@ static void xdg_surface_handle_ack_configure(struct wl_client *client, assert(0 && "not reached"); break; case WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL: - xdg_toplevel_v6_ack_configure(surface, configure); + handle_xdg_toplevel_v6_ack_configure(surface, configure); break; case WLR_XDG_SURFACE_V6_ROLE_POPUP: break; @@ -246,7 +246,7 @@ static void xdg_surface_send_configure(void *user_data) { assert(0 && "not reached"); break; case WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL: - xdg_toplevel_v6_send_configure(surface, configure); + send_xdg_toplevel_v6_configure(surface, configure); break; case WLR_XDG_SURFACE_V6_ROLE_POPUP: zxdg_popup_v6_send_configure(surface->popup->resource, @@ -260,7 +260,7 @@ static void xdg_surface_send_configure(void *user_data) { zxdg_surface_v6_send_configure(surface->resource, configure->serial); } -uint32_t xdg_surface_v6_schedule_configure(struct wlr_xdg_surface_v6 *surface) { +uint32_t schedule_xdg_surface_v6_configure(struct wlr_xdg_surface_v6 *surface) { struct wl_display *display = wl_client_get_display(surface->client->client); struct wl_event_loop *loop = wl_display_get_event_loop(display); bool pending_same = false; @@ -271,7 +271,7 @@ uint32_t xdg_surface_v6_schedule_configure(struct wlr_xdg_surface_v6 *surface) { break; case WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL: pending_same = - xdg_surface_v6_toplevel_state_compare(surface->toplevel); + compare_xdg_surface_v6_toplevel_state(surface->toplevel); break; case WLR_XDG_SURFACE_V6_ROLE_POPUP: break; @@ -336,7 +336,7 @@ static void xdg_surface_handle_surface_destroy(struct wl_listener *listener, void *data) { struct wlr_xdg_surface_v6 *xdg_surface = wl_container_of(listener, xdg_surface, surface_destroy_listener); - xdg_surface_destroy(xdg_surface); + destroy_xdg_surface_v6(xdg_surface); } static void handle_surface_committed(struct wlr_surface *wlr_surface, @@ -365,10 +365,10 @@ static void handle_surface_committed(struct wlr_surface *wlr_surface, "xdg_surface must have a role"); break; case WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL: - xdg_surface_v6_toplevel_committed(surface); + handle_xdg_surface_v6_toplevel_committed(surface); break; case WLR_XDG_SURFACE_V6_ROLE_POPUP: - xdg_surface_v6_popup_committed(surface); + handle_xdg_surface_v6_popup_committed(surface); break; } @@ -384,18 +384,18 @@ static void handle_surface_committed(struct wlr_surface *wlr_surface, } if (surface->configured && !wlr_surface_has_buffer(surface->surface) && surface->mapped) { - xdg_surface_unmap(surface); + unmap_xdg_surface_v6(surface); } } static void xdg_surface_handle_resource_destroy(struct wl_resource *resource) { struct wlr_xdg_surface_v6 *surface = xdg_surface_from_resource(resource); if (surface != NULL) { - xdg_surface_destroy(surface); + destroy_xdg_surface_v6(surface); } } -struct wlr_xdg_surface_v6 *xdg_surface_v6_create( +struct wlr_xdg_surface_v6 *create_xdg_surface_v6( struct wlr_xdg_client_v6 *client, struct wlr_surface *surface, uint32_t id) { if (wlr_surface_has_buffer(surface)) { diff --git a/types/xdg_shell_v6/wlr_xdg_toplevel_v6.c b/types/xdg_shell_v6/wlr_xdg_toplevel_v6.c index f4d1888b..2bcfaf0d 100644 --- a/types/xdg_shell_v6/wlr_xdg_toplevel_v6.c +++ b/types/xdg_shell_v6/wlr_xdg_toplevel_v6.c @@ -15,9 +15,9 @@ static struct wlr_xdg_surface_v6 *xdg_surface_from_xdg_toplevel_resource( return wl_resource_get_user_data(resource); } -void xdg_toplevel_destroy(struct wlr_xdg_surface_v6 *surface) { +void destroy_xdg_toplevel_v6(struct wlr_xdg_surface_v6 *surface) { assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL); - xdg_surface_unmap(surface); + unmap_xdg_surface_v6(surface); wl_resource_set_user_data(surface->toplevel->resource, NULL); free(surface->toplevel); @@ -257,7 +257,7 @@ static const struct zxdg_toplevel_v6_interface .set_minimized = xdg_toplevel_handle_set_minimized, }; -void xdg_toplevel_v6_ack_configure(struct wlr_xdg_surface_v6 *surface, +void handle_xdg_toplevel_v6_ack_configure(struct wlr_xdg_surface_v6 *surface, struct wlr_xdg_surface_v6_configure *configure) { assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL); assert(configure->toplevel_state != NULL); @@ -272,7 +272,7 @@ void xdg_toplevel_v6_ack_configure(struct wlr_xdg_surface_v6 *surface, configure->toplevel_state->activated; } -bool xdg_surface_v6_toplevel_state_compare(struct wlr_xdg_toplevel_v6 *state) { +bool compare_xdg_surface_v6_toplevel_state(struct wlr_xdg_toplevel_v6 *state) { struct { struct wlr_xdg_toplevel_v6_state state; uint32_t width, height; @@ -321,7 +321,7 @@ bool xdg_surface_v6_toplevel_state_compare(struct wlr_xdg_toplevel_v6 *state) { return false; } -void xdg_toplevel_v6_send_configure(struct wlr_xdg_surface_v6 *surface, +void send_xdg_toplevel_v6_configure(struct wlr_xdg_surface_v6 *surface, struct wlr_xdg_surface_v6_configure *configure) { assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL); @@ -386,13 +386,13 @@ error_out: wl_resource_post_no_memory(surface->toplevel->resource); } -void xdg_surface_v6_toplevel_committed(struct wlr_xdg_surface_v6 *surface) { +void handle_xdg_surface_v6_toplevel_committed(struct wlr_xdg_surface_v6 *surface) { assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL); if (!surface->toplevel->added) { // on the first commit, send a configure request to tell the client it // is added - xdg_surface_v6_schedule_configure(surface); + schedule_xdg_surface_v6_configure(surface); surface->toplevel->added = true; return; } @@ -412,13 +412,13 @@ static void xdg_toplevel_handle_resource_destroy(struct wl_resource *resource) { struct wlr_xdg_surface_v6 *surface = xdg_surface_from_xdg_toplevel_resource(resource); if (surface != NULL) { - xdg_toplevel_destroy(surface); + destroy_xdg_toplevel_v6(surface); } } -void xdg_toplevel_v6_create(struct wlr_xdg_surface_v6 *xdg_surface, +void create_xdg_toplevel_v6(struct wlr_xdg_surface_v6 *xdg_surface, uint32_t id) { - if (wlr_surface_set_role(xdg_surface->surface, XDG_TOPLEVEL_ROLE, + if (wlr_surface_set_role(xdg_surface->surface, XDG_TOPLEVEL_V6_ROLE, xdg_surface->resource, ZXDG_SHELL_V6_ERROR_ROLE)) { return; } @@ -458,7 +458,7 @@ uint32_t wlr_xdg_toplevel_v6_set_size(struct wlr_xdg_surface_v6 *surface, surface->toplevel->server_pending.width = width; surface->toplevel->server_pending.height = height; - return xdg_surface_v6_schedule_configure(surface); + return schedule_xdg_surface_v6_configure(surface); } uint32_t wlr_xdg_toplevel_v6_set_activated(struct wlr_xdg_surface_v6 *surface, @@ -466,7 +466,7 @@ uint32_t wlr_xdg_toplevel_v6_set_activated(struct wlr_xdg_surface_v6 *surface, assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL); surface->toplevel->server_pending.activated = activated; - return xdg_surface_v6_schedule_configure(surface); + return schedule_xdg_surface_v6_configure(surface); } uint32_t wlr_xdg_toplevel_v6_set_maximized(struct wlr_xdg_surface_v6 *surface, @@ -474,7 +474,7 @@ uint32_t wlr_xdg_toplevel_v6_set_maximized(struct wlr_xdg_surface_v6 *surface, assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL); surface->toplevel->server_pending.maximized = maximized; - return xdg_surface_v6_schedule_configure(surface); + return schedule_xdg_surface_v6_configure(surface); } uint32_t wlr_xdg_toplevel_v6_set_fullscreen(struct wlr_xdg_surface_v6 *surface, @@ -482,7 +482,7 @@ uint32_t wlr_xdg_toplevel_v6_set_fullscreen(struct wlr_xdg_surface_v6 *surface, assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL); surface->toplevel->server_pending.fullscreen = fullscreen; - return xdg_surface_v6_schedule_configure(surface); + return schedule_xdg_surface_v6_configure(surface); } uint32_t wlr_xdg_toplevel_v6_set_resizing(struct wlr_xdg_surface_v6 *surface, @@ -490,5 +490,5 @@ uint32_t wlr_xdg_toplevel_v6_set_resizing(struct wlr_xdg_surface_v6 *surface, assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL); surface->toplevel->server_pending.resizing = resizing; - return xdg_surface_v6_schedule_configure(surface); + return schedule_xdg_surface_v6_configure(surface); } |