aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/detail
diff options
context:
space:
mode:
Diffstat (limited to 'pugl/detail')
-rw-r--r--pugl/detail/mac.m9
-rw-r--r--pugl/detail/x11.c2
2 files changed, 4 insertions, 7 deletions
diff --git a/pugl/detail/mac.m b/pugl/detail/mac.m
index ca2cb7c..36499c0 100644
--- a/pugl/detail/mac.m
+++ b/pugl/detail/mac.m
@@ -643,8 +643,7 @@ handleCrossing(PuglWrapperView* view, NSEvent* event, const PuglEventType type)
{
(void)sender;
- PuglEvent ev = { 0 };
- ev.type = PUGL_CLOSE;
+ const PuglEvent ev = {{PUGL_CLOSE, 0}};
puglDispatchEvent(window->puglview, &ev);
return YES;
}
@@ -666,8 +665,7 @@ handleCrossing(PuglWrapperView* view, NSEvent* event, const PuglEventType type)
wrapperView->urgentTimer = NULL;
}
- PuglEvent ev = { 0 };
- ev.type = PUGL_FOCUS_IN;
+ PuglEvent ev = {{PUGL_FOCUS_IN, 0}};
ev.focus.grab = false;
puglDispatchEvent(window->puglview, &ev);
}
@@ -676,8 +674,7 @@ handleCrossing(PuglWrapperView* view, NSEvent* event, const PuglEventType type)
{
(void)notification;
- PuglEvent ev = { 0 };
- ev.type = PUGL_FOCUS_OUT;
+ PuglEvent ev = {{PUGL_FOCUS_OUT, 0}};
ev.focus.grab = false;
puglDispatchEvent(window->puglview, &ev);
}
diff --git a/pugl/detail/x11.c b/pugl/detail/x11.c
index 38f10d0..9156c57 100644
--- a/pugl/detail/x11.c
+++ b/pugl/detail/x11.c
@@ -409,7 +409,7 @@ translateEvent(PuglView* view, XEvent xevent)
{
const PuglX11Atoms* atoms = &view->world->impl->atoms;
- PuglEvent event = {0};
+ PuglEvent event = {{PUGL_NOTHING, 0}};
event.any.flags = xevent.xany.send_event ? PUGL_IS_SEND_EVENT : 0;
switch (xevent.type) {