summaryrefslogtreecommitdiff
path: root/sway/desktop/idle_inhibit_v1.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop/idle_inhibit_v1.c')
-rw-r--r--sway/desktop/idle_inhibit_v1.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sway/desktop/idle_inhibit_v1.c b/sway/desktop/idle_inhibit_v1.c
index c02ca26e..da17d0f2 100644
--- a/sway/desktop/idle_inhibit_v1.c
+++ b/sway/desktop/idle_inhibit_v1.c
@@ -9,7 +9,7 @@
static void handle_destroy(struct wl_listener *listener, void *data) {
struct sway_idle_inhibitor_v1 *inhibitor =
wl_container_of(listener, inhibitor, destroy);
- wlr_log(L_DEBUG, "Sway idle inhibitor destroyed");
+ wlr_log(WLR_DEBUG, "Sway idle inhibitor destroyed");
wl_list_remove(&inhibitor->link);
wl_list_remove(&inhibitor->destroy.link);
idle_inhibit_v1_check_active(inhibitor->manager);
@@ -20,7 +20,7 @@ void handle_idle_inhibitor_v1(struct wl_listener *listener, void *data) {
struct wlr_idle_inhibitor_v1 *wlr_inhibitor = data;
struct sway_idle_inhibit_manager_v1 *manager =
wl_container_of(listener, manager, new_idle_inhibitor_v1);
- wlr_log(L_DEBUG, "New sway idle inhibitor");
+ wlr_log(WLR_DEBUG, "New sway idle inhibitor");
struct sway_idle_inhibitor_v1 *inhibitor =
calloc(1, sizeof(struct sway_idle_inhibitor_v1));
@@ -67,6 +67,7 @@ struct sway_idle_inhibit_manager_v1 *sway_idle_inhibit_manager_v1_create(
manager->wlr_manager = wlr_idle_inhibit_v1_create(wl_display);
if (!manager->wlr_manager) {
+ free(manager);
return NULL;
}
manager->idle = idle;