From efbe686e63af2deb92df03f5fda34d35233ba706 Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Wed, 11 Nov 2026 11:13:53 +0100 Subject: [PATCH] remove LISTEN_STATIC It's only used in createidleinhibitor(). --- dwl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dwl.c b/dwl.c index 8db7fc7..06b5c07 100644 --- a/dwl.c +++ b/dwl.c @@ -83,7 +83,6 @@ #define VISIBLEON(C, M) ((M) && (C)->mon == (M) && ((C)->tags & (M)->tagset[(M)->seltags])) #define TAGMASK ((1u << TAGCOUNT) - 1) #define LISTEN(E, L, H) wl_signal_add((E), ((L)->notify = (H), (L))) -#define LISTEN_STATIC(E, H) do { struct wl_listener *_l = ecalloc(1, sizeof(*_l)); _l->notify = (H); wl_signal_add((E), _l); } while (0) /* enums */ enum { CurNormal, CurPressed, CurMove, CurResize }; /* cursor */ @@ -1103,7 +1102,8 @@ void createidleinhibitor(struct wl_listener *listener, void *data) { struct wlr_idle_inhibitor_v1 *idle_inhibitor = data; - LISTEN_STATIC(&idle_inhibitor->events.destroy, destroyidleinhibitor); + struct wl_listener *destroy = ecalloc(1, sizeof(*destroy)); + LISTEN(&idle_inhibitor->events.destroy, destroy, destroyidleinhibitor); checkidleinhibitor(NULL); }