From 9de33a73aae71cf661b7e3efafe5df1819f70274 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 15 Jul 2022 14:34:11 +0100 Subject: Fix missing field initializers when building as C++ --- src/x11.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/x11.c b/src/x11.c index a6ebf95..4e68674 100644 --- a/src/x11.c +++ b/src/x11.c @@ -949,7 +949,7 @@ puglGrabFocus(PuglView* const view) { PuglInternals* const impl = view->impl; Display* const display = view->world->impl->display; - XWindowAttributes attrs = {0}; + XWindowAttributes attrs = PUGL_INIT_STRUCT; if (!impl->win || !XGetWindowAttributes(display, impl->win, &attrs)) { return PUGL_UNKNOWN_ERROR; @@ -978,7 +978,7 @@ puglRequestAttention(PuglView* const view) PuglInternals* const impl = view->impl; Display* const display = view->world->impl->display; const PuglX11Atoms* const atoms = &view->world->impl->atoms; - XEvent event = {0}; + XEvent event = PUGL_INIT_STRUCT; event.type = ClientMessage; event.xclient.window = impl->win; @@ -1079,7 +1079,7 @@ puglStopTimer(PuglView* const view, const uintptr_t id) static XEvent eventToX(PuglView* const view, const PuglEvent* const event) { - XEvent xev = {0}; + XEvent xev = PUGL_INIT_STRUCT; xev.xany.send_event = True; switch (event->type) { -- cgit v1.2.1