aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-01-08 01:02:07 -0500
committerDavid Robillard <d@drobilla.net>2023-01-08 01:06:37 -0500
commit92b5ab6bdfc8450ed3c4e4e7006cee949386dcd4 (patch)
treeaa91ae18efac00651f73efef51173edbcc00489f /src/x11.c
parent14b35ef217f5ee387c4f33b1b24bebb015e18f23 (diff)
downloadpugl-92b5ab6bdfc8450ed3c4e4e7006cee949386dcd4.tar.gz
pugl-92b5ab6bdfc8450ed3c4e4e7006cee949386dcd4.tar.bz2
pugl-92b5ab6bdfc8450ed3c4e4e7006cee949386dcd4.zip
Add support for raising windows
Diffstat (limited to 'src/x11.c')
-rw-r--r--src/x11.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/x11.c b/src/x11.c
index 593e8b7..4e8d591 100644
--- a/src/x11.c
+++ b/src/x11.c
@@ -655,12 +655,23 @@ puglUnrealize(PuglView* const view)
}
PuglStatus
-puglShow(PuglView* const view)
+puglShow(PuglView* const view, const PuglShowCommand command)
{
PuglStatus st = view->impl->win ? PUGL_SUCCESS : puglRealize(view);
if (!st) {
- XMapRaised(view->world->impl->display, view->impl->win);
+ switch (command) {
+ case PUGL_SHOW_PASSIVE:
+ XMapWindow(view->world->impl->display, view->impl->win);
+ break;
+ case PUGL_SHOW_RAISE:
+ XMapRaised(view->world->impl->display, view->impl->win);
+ break;
+ case PUGL_SHOW_FORCE_RAISE:
+ XMapRaised(view->world->impl->display, view->impl->win);
+ break;
+ }
+
st = puglPostRedisplay(view);
}