egl/dri2/x11: Set dri2_dpy->own_device
When the user calls eglGetDisplay(EGL_DEFAULT_DISPLAY), the Wayland and DRM platforms set dri2_dpy->own_device=true. This patch makes the X11 platform do the same for consistency. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
This commit is contained in:
@@ -25,6 +25,7 @@
|
|||||||
* Kristian Høgsberg <krh@bitplanet.net>
|
* Kristian Høgsberg <krh@bitplanet.net>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -1038,6 +1039,7 @@ dri2_initialize_x11_swrast(_EGLDriver *drv, _EGLDisplay *disp)
|
|||||||
disp->DriverData = (void *) dri2_dpy;
|
disp->DriverData = (void *) dri2_dpy;
|
||||||
if (disp->PlatformDisplay == NULL) {
|
if (disp->PlatformDisplay == NULL) {
|
||||||
dri2_dpy->conn = xcb_connect(0, 0);
|
dri2_dpy->conn = xcb_connect(0, 0);
|
||||||
|
dri2_dpy->own_device = true;
|
||||||
} else {
|
} else {
|
||||||
dri2_dpy->conn = XGetXCBConnection((Display *) disp->PlatformDisplay);
|
dri2_dpy->conn = XGetXCBConnection((Display *) disp->PlatformDisplay);
|
||||||
}
|
}
|
||||||
@@ -1153,6 +1155,7 @@ dri2_initialize_x11_dri2(_EGLDriver *drv, _EGLDisplay *disp)
|
|||||||
disp->DriverData = (void *) dri2_dpy;
|
disp->DriverData = (void *) dri2_dpy;
|
||||||
if (disp->PlatformDisplay == NULL) {
|
if (disp->PlatformDisplay == NULL) {
|
||||||
dri2_dpy->conn = xcb_connect(0, 0);
|
dri2_dpy->conn = xcb_connect(0, 0);
|
||||||
|
dri2_dpy->own_device = true;
|
||||||
} else {
|
} else {
|
||||||
dri2_dpy->conn = XGetXCBConnection((Display *) disp->PlatformDisplay);
|
dri2_dpy->conn = XGetXCBConnection((Display *) disp->PlatformDisplay);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user