mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
xwayland: connect to the wl display before calling into EGL
using EGL (e.g., eglQueryString, epoxy_has_egl_extension)
before establishing this connection
enables the GBM/EGL implementation to potentially consume the
WAYLAND_SOCKET fd, which, if closed, will cause the compositor
to kill this xserver
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1646>
(cherry picked from commit ff8ec59c97)
This commit is contained in:
committed by
Alan Coopersmith
parent
affb27caa2
commit
afa83a48f8
@@ -981,6 +981,12 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
xwl_screen->display = wl_display_connect(NULL);
|
||||
if (xwl_screen->display == NULL) {
|
||||
ErrorF("could not connect to wayland server\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#ifdef XWL_HAS_GLAMOR
|
||||
if (xwl_screen->glamor && !xwl_glamor_init_gbm(xwl_screen)) {
|
||||
ErrorF("xwayland glamor: failed to setup GBM backend, falling back to sw accel\n");
|
||||
@@ -1009,12 +1015,6 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
|
||||
if (!monitorResolution)
|
||||
monitorResolution = DEFAULT_DPI;
|
||||
|
||||
xwl_screen->display = wl_display_connect(NULL);
|
||||
if (xwl_screen->display == NULL) {
|
||||
ErrorF("could not connect to wayland server\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (use_fixed_size) {
|
||||
if (!xwl_screen_init_randr_fixed(xwl_screen))
|
||||
return FALSE;
|
||||
|
||||
Reference in New Issue
Block a user