From bb1f8673b3a4883b8c0f3185a6ec3bbe410d9307 Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Fri, 9 Aug 2024 23:33:14 +0300 Subject: [PATCH] compositor: use wl_resource_post_error_vargs() --- types/wlr_compositor.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/types/wlr_compositor.c b/types/wlr_compositor.c index d2c881e2a..6b31ab857 100644 --- a/types/wlr_compositor.c +++ b/types/wlr_compositor.c @@ -882,11 +882,7 @@ void wlr_surface_reject_pending(struct wlr_surface *surface, struct wl_resource va_list args; va_start(args, msg); - // XXX: libwayland could expose wl_resource_post_error_vargs() instead - char buffer[128]; // Matches the size of the buffer used in libwayland - vsnprintf(buffer, sizeof(buffer), msg, args); - - wl_resource_post_error(resource, code, "%s", buffer); + wl_resource_post_error_vargs(resource, code, msg, args); surface->pending_rejected = true; va_end(args);