From 17af0352387a536c461cf366132b3d6c90ce3c70 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 21 Jul 2019 18:16:48 +0200 Subject: Implement puglGrabFocus on Windows and MacOS --- pugl/pugl_osx.m | 2 +- pugl/pugl_win.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pugl/pugl_osx.m b/pugl/pugl_osx.m index 2507fcb..28ea313 100644 --- a/pugl/pugl_osx.m +++ b/pugl/pugl_osx.m @@ -712,7 +712,7 @@ puglDestroy(PuglView* view) void puglGrabFocus(PuglView* view) { - // TODO + [view->impl->window makeKeyWindow]; } PuglStatus diff --git a/pugl/pugl_win.c b/pugl/pugl_win.c index dbb62af..2e05c71 100644 --- a/pugl/pugl_win.c +++ b/pugl/pugl_win.c @@ -799,8 +799,7 @@ handleMessage(PuglView* view, UINT message, WPARAM wParam, LPARAM lParam) void puglGrabFocus(PuglView* view) { - (void)view; - // TODO + SetFocus(view->impl->hwnd); } PuglStatus -- cgit v1.2.1