summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/egl/drivers/dri2/platform_x11.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index f5b17de7330..f6378f47ebf 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -25,6 +25,7 @@
* Kristian Høgsberg <[email protected]>
*/
+#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
@@ -1038,6 +1039,7 @@ dri2_initialize_x11_swrast(_EGLDriver *drv, _EGLDisplay *disp)
disp->DriverData = (void *) dri2_dpy;
if (disp->PlatformDisplay == NULL) {
dri2_dpy->conn = xcb_connect(0, 0);
+ dri2_dpy->own_device = true;
} else {
dri2_dpy->conn = XGetXCBConnection((Display *) disp->PlatformDisplay);
}
@@ -1153,6 +1155,7 @@ dri2_initialize_x11_dri2(_EGLDriver *drv, _EGLDisplay *disp)
disp->DriverData = (void *) dri2_dpy;
if (disp->PlatformDisplay == NULL) {
dri2_dpy->conn = xcb_connect(0, 0);
+ dri2_dpy->own_device = true;
} else {
dri2_dpy->conn = XGetXCBConnection((Display *) disp->PlatformDisplay);
}