From 23a607fa568723333ecd7980778194e10630d082 Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Fri, 27 Feb 2026 21:22:14 -0800 Subject: [PATCH] [digesting_libdecor] remove wl_callback and init_done --- digesting_libdecor.c | 20 -------------------- digesting_libdecor.h | 2 -- 2 files changed, 22 deletions(-) diff --git a/digesting_libdecor.c b/digesting_libdecor.c index 0350941..fd133f1 100755 --- a/digesting_libdecor.c +++ b/digesting_libdecor.c @@ -68,7 +68,6 @@ const struct xdg_surface_listener xdg_surface_listener; const struct xdg_toplevel_listener xdg_toplevel_listener; const struct zxdg_toplevel_decoration_v1_listener xdg_toplevel_decoration_listener; const struct xdg_wm_base_listener xdg_wm_base_listener; -const struct wl_callback_listener init_wl_display_callback_listener; const struct wl_buffer_listener buffer_listener; const struct wl_callback_listener shm_callback_listener; @@ -230,20 +229,6 @@ const struct wl_registry_listener wl_registry_listener = { wlevent__wl_registry_global_remove, }; -static void -init_wl_display_callback(void *user_data, struct wl_callback *callback, uint32_t time){ - struct libdecor *context = user_data; - - ctx.init_done = true; - - wl_callback_destroy(callback); - ctx.wl_callback = 0; -} - -const struct wl_callback_listener init_wl_display_callback_listener = { - init_wl_display_callback -}; - static void seat_capabilities(void *data, struct wl_seat *wl_seat, uint32_t capabilities){ struct seat *seat = data; @@ -344,8 +329,6 @@ int main(){ if (ctx.wl_registry != 0){ wl_registry_add_listener(ctx.wl_registry, &wl_registry_listener, 0); - ctx.wl_callback = wl_display_sync(ctx.wl_display); - wl_callback_add_listener(ctx.wl_callback, &init_wl_display_callback_listener, 0); wl_display_flush(ctx.wl_display); wl_display_dispatch(ctx.wl_display); @@ -1225,9 +1208,6 @@ cleanup(void){ if (ctx.wl_subcompositor != 0){ wl_subcompositor_destroy(ctx.wl_subcompositor); } - if (ctx.wl_callback != 0){ - wl_callback_destroy(ctx.wl_callback); - } if (ctx.xdg_wm_base != 0){ xdg_wm_base_destroy(ctx.xdg_wm_base); } diff --git a/digesting_libdecor.h b/digesting_libdecor.h index 813fc25..ce349d9 100644 --- a/digesting_libdecor.h +++ b/digesting_libdecor.h @@ -358,12 +358,10 @@ typedef struct Ctx{ struct wl_shm *wl_shm; struct xdg_wm_base *xdg_wm_base; struct zxdg_decoration_manager_v1 *decoration_manager; - struct wl_callback *wl_callback; struct wl_list seat_list; struct wl_list output_list; - bool init_done; bool has_error; bool has_argb;