diff options
Diffstat (limited to 'pugl/detail/x11.c')
-rw-r--r-- | pugl/detail/x11.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pugl/detail/x11.c b/pugl/detail/x11.c index 10ae0bb..7edc1ed 100644 --- a/pugl/detail/x11.c +++ b/pugl/detail/x11.c @@ -66,8 +66,12 @@ static const long eventMask = ButtonPressMask | ButtonReleaseMask | KeyPressMask | KeyReleaseMask); PuglWorldInternals* -puglInitWorldInternals(void) +puglInitWorldInternals(PuglWorldType type, PuglWorldFlags flags) { + if (type == PUGL_PROGRAM && (flags & PUGL_WORLD_THREADS)) { + XInitThreads(); + } + Display* display = XOpenDisplay(NULL); if (!display) { return NULL; |