cleanup for style and formatting

This commit is contained in:
Tony Crisci 2017-08-09 12:23:38 -04:00
parent 816a7f8257
commit 26edd5fb9e
1 changed files with 24 additions and 22 deletions

View File

@ -31,13 +31,15 @@ static void xdg_toplevel_show_window_menu(struct wl_client *client,
wlr_log(L_DEBUG, "TODO: toplevel show window menu");
}
static void xdg_toplevel_move(struct wl_client *client, struct wl_resource *resource, struct wl_resource *seat_resource, uint32_t serial) {
static void xdg_toplevel_move(struct wl_client *client,
struct wl_resource *resource, struct wl_resource *seat_resource,
uint32_t serial) {
wlr_log(L_DEBUG, "TODO: toplevel move");
}
static void xdg_toplevel_resize(struct wl_client *client, struct wl_resource
*resource, struct wl_resource *seat_resource, uint32_t serial,
uint32_t edges) {
static void xdg_toplevel_resize(struct wl_client *client,
struct wl_resource *resource, struct wl_resource *seat_resource,
uint32_t serial, uint32_t edges) {
wlr_log(L_DEBUG, "TODO: toplevel resize");
}
@ -146,7 +148,6 @@ static void xdg_shell_get_xdg_surface(struct wl_client *client, struct
struct wl_resource *surface_resource) {
struct xdg_shell_state *shell_state = wl_resource_get_user_data(resource);
struct wlr_texture *wlr_texture = wl_resource_get_user_data(surface_resource);
wlr_log(L_DEBUG, "@@ MALLOC STATE");
struct xdg_surface_state *state = malloc(sizeof(struct xdg_surface_state));
state->display = shell_state->display;
state->wlr_texture = wlr_texture;
@ -192,12 +193,13 @@ void xdg_shell_init(struct wl_display *display, struct xdg_shell_state *state) {
}
void xdg_shell_release(struct xdg_shell_state *state) {
if (!state)
if (!state) {
return;
}
struct wl_resource *_resource = NULL;
wl_resource_for_each(_resource, &state->wl_resources) {
struct wl_list *link = wl_resource_get_link(_resource);
struct wl_resource *resource = NULL;
wl_resource_for_each(resource, &state->wl_resources) {
struct wl_list *link = wl_resource_get_link(resource);
wl_list_remove(link);
}
}