From d41a4a0baeb268515044857d8121c033f3c0b477 Mon Sep 17 00:00:00 2001 From: emersion Date: Thu, 28 Sep 2017 01:02:30 +0200 Subject: [PATCH] wl_shell: gluten-free cosmetic variable renaming --- rootston/wl_shell.c | 2 +- types/wlr_wl_shell.c | 21 ++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/rootston/wl_shell.c b/rootston/wl_shell.c index adb7eaee..2b850d09 100644 --- a/rootston/wl_shell.c +++ b/rootston/wl_shell.c @@ -56,7 +56,7 @@ void handle_wl_shell_surface(struct wl_listener *listener, void *data) { struct wlr_wl_shell_surface *surface = data; wlr_log(L_DEBUG, "new shell surface: title=%s, class=%s", surface->title, surface->class); - //wlr_wl_shell_surface_ping(surface); // TODO: segfaults + wlr_wl_shell_surface_ping(surface); // TODO: segfaults struct roots_wl_shell_surface *roots_surface = calloc(1, sizeof(struct roots_wl_shell_surface)); diff --git a/types/wlr_wl_shell.c b/types/wlr_wl_shell.c index 1384c995..6f941bda 100644 --- a/types/wlr_wl_shell.c +++ b/types/wlr_wl_shell.c @@ -362,23 +362,22 @@ static void wl_shell_bind(struct wl_client *wl_client, void *_wl_shell, } struct wlr_wl_shell *wlr_wl_shell_create(struct wl_display *display) { - struct wlr_wl_shell *wlr_wl_shell = - calloc(1, sizeof(struct wlr_wl_shell)); - if (!wlr_wl_shell) { + struct wlr_wl_shell *wl_shell = calloc(1, sizeof(struct wlr_wl_shell)); + if (!wl_shell) { return NULL; } - wlr_wl_shell->ping_timeout = 10000; + wl_shell->ping_timeout = 10000; struct wl_global *wl_global = wl_global_create(display, - &wl_shell_interface, 1, wlr_wl_shell, wl_shell_bind); + &wl_shell_interface, 1, wl_shell, wl_shell_bind); if (!wl_global) { - free(wlr_wl_shell); + free(wl_shell); return NULL; } - wlr_wl_shell->wl_global = wl_global; - wl_list_init(&wlr_wl_shell->wl_resources); - wl_list_init(&wlr_wl_shell->surfaces); - wl_signal_init(&wlr_wl_shell->events.new_surface); - return wlr_wl_shell; + wl_shell->wl_global = wl_global; + wl_list_init(&wl_shell->wl_resources); + wl_list_init(&wl_shell->surfaces); + wl_signal_init(&wl_shell->events.new_surface); + return wl_shell; } void wlr_wl_shell_destroy(struct wlr_wl_shell *wlr_wl_shell) {