aboutsummaryrefslogtreecommitdiffstats
path: root/src/win.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/win.c')
-rw-r--r--src/win.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/win.c b/src/win.c
index a0b7901..80a5baf 100644
--- a/src/win.c
+++ b/src/win.c
@@ -309,7 +309,7 @@ puglUnrealize(PuglView* const view)
}
PuglStatus
-puglShow(PuglView* view)
+puglShow(PuglView* view, const PuglShowCommand command)
{
PuglInternals* impl = view->impl;
@@ -320,8 +320,20 @@ puglShow(PuglView* view)
}
}
- ShowWindow(impl->hwnd, SW_SHOWNORMAL);
- SetFocus(impl->hwnd);
+ switch (command) {
+ case PUGL_SHOW_PASSIVE:
+ ShowWindow(impl->hwnd, SW_SHOWNOACTIVATE);
+ break;
+ case PUGL_SHOW_RAISE:
+ ShowWindow(impl->hwnd, SW_SHOWNORMAL);
+ SetActiveWindow(impl->hwnd);
+ break;
+ case PUGL_SHOW_FORCE_RAISE:
+ ShowWindow(impl->hwnd, SW_SHOWNORMAL);
+ SetForegroundWindow(impl->hwnd);
+ break;
+ }
+
return PUGL_SUCCESS;
}