aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/detail/mac.m
diff options
context:
space:
mode:
Diffstat (limited to 'pugl/detail/mac.m')
-rw-r--r--pugl/detail/mac.m9
1 files changed, 3 insertions, 6 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);
}