diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index e0138719738..00063ca42b1 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -448,16 +448,16 @@ destroy_window_callback(void *data) } static struct wl_surface * -get_wl_surface_proxy(struct wl_egl_window *window) +get_wl_surface(struct wl_egl_window *window) { /* Version 3 of wl_egl_window introduced a version field at the same * location where a pointer to wl_surface was stored. Thus, if * window->version is dereferenceable, we've been given an older version of * wl_egl_window, and window->version points to wl_surface */ if (_eglPointerIsDereferenceable((void *)(window->version))) { - return wl_proxy_create_wrapper((void *)(window->version)); + return (void *)(window->version); } - return wl_proxy_create_wrapper(window->surface); + return window->surface; } static void @@ -750,7 +750,8 @@ dri2_wl_create_window_surface(_EGLDisplay *disp, _EGLConfig *conf, wl_proxy_set_queue((struct wl_proxy *)dri2_surf->wl_dpy_wrapper, dri2_surf->wl_queue); - dri2_surf->wl_surface_wrapper = get_wl_surface_proxy(window); + dri2_surf->wl_surface_wrapper = + wl_proxy_create_wrapper(get_wl_surface(window)); if (!dri2_surf->wl_surface_wrapper) { _eglError(EGL_BAD_ALLOC, "dri2_create_surface"); goto cleanup_dpy_wrapper;