aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-07-21 15:56:16 +0200
committerDavid Robillard <d@drobilla.net>2019-07-21 15:56:16 +0200
commitb5ef9123301370a785ce6ff28adc27e64486ea5d (patch)
tree114a93f74bf51cf9b993b02f40330055b6e4813a
parent5192224751e8b6d9963312e217782f7a1a70fb39 (diff)
downloadpugl-b5ef9123301370a785ce6ff28adc27e64486ea5d.tar.gz
pugl-b5ef9123301370a785ce6ff28adc27e64486ea5d.tar.bz2
pugl-b5ef9123301370a785ce6ff28adc27e64486ea5d.zip
Implement focus on Windows
-rw-r--r--pugl/pugl_win.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pugl/pugl_win.c b/pugl/pugl_win.c
index fc72498..05888d3 100644
--- a/pugl/pugl_win.c
+++ b/pugl/pugl_win.c
@@ -776,6 +776,12 @@ handleMessage(PuglView* view, UINT message, WPARAM wParam, LPARAM lParam)
translateMessageParamsToEvent(lParam, wParam, &event);
}
break;
+ case WM_SETFOCUS:
+ event.type = PUGL_FOCUS_IN;
+ break;
+ case WM_KILLFOCUS:
+ event.type = PUGL_FOCUS_OUT;
+ break;
case WM_QUIT:
case PUGL_LOCAL_CLOSE_MSG:
event.close.type = PUGL_CLOSE;