aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--demos/cube.c1
-rw-r--r--demos/cube.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/demos/cube.c b/demos/cube.c
index 2efbfb08..0abffae6 100644
--- a/demos/cube.c
+++ b/demos/cube.c
@@ -2241,6 +2241,7 @@ static void demo_create_window(struct demo *demo) {
#elif defined(VK_USE_PLATFORM_XLIB_KHR)
static void demo_create_xlib_window(struct demo *demo) {
+ XInitThreads();
demo->display = XOpenDisplay(NULL);
long visualMask = VisualScreenMask;
int numberOfVisuals;
diff --git a/demos/cube.cpp b/demos/cube.cpp
index a7bb7a09..e5fa6ae2 100644
--- a/demos/cube.cpp
+++ b/demos/cube.cpp
@@ -2157,6 +2157,7 @@ struct Demo {
#elif defined(VK_USE_PLATFORM_XLIB_KHR)
void create_xlib_window() {
+ XInitThreads();
display = XOpenDisplay(nullptr);
long visualMask = VisualScreenMask;
int numberOfVisuals;