aboutsummaryrefslogtreecommitdiffstats
path: root/pugl
diff options
context:
space:
mode:
Diffstat (limited to 'pugl')
-rw-r--r--pugl/detail/mac.m5
-rw-r--r--pugl/detail/x11.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/pugl/detail/mac.m b/pugl/detail/mac.m
index 5b332f1..a438701 100644
--- a/pugl/detail/mac.m
+++ b/pugl/detail/mac.m
@@ -772,7 +772,10 @@ puglDestroy(PuglView* view)
void
puglGrabFocus(PuglView* view)
{
- [view->impl->window makeKeyWindow];
+ NSWindow* window = [view->impl->wrapperView window];
+
+ [window makeKeyWindow];
+ [window makeFirstResponder:view->impl->wrapperView];
}
void
diff --git a/pugl/detail/x11.c b/pugl/detail/x11.c
index e6057af..a766ace 100644
--- a/pugl/detail/x11.c
+++ b/pugl/detail/x11.c
@@ -440,7 +440,7 @@ void
puglGrabFocus(PuglView* view)
{
XSetInputFocus(
- view->impl->display, view->impl->win, RevertToPointerRoot, CurrentTime);
+ view->impl->display, view->impl->win, RevertToNone, CurrentTime);
}
void