Skip to content
Snippets Groups Projects
Commit 8817a5f1 authored by Daniel Stone's avatar Daniel Stone
Browse files

backend-x11: Fix EGL compile warning


EGLNativeWindowType can be a lot of different things, including a
pointer which an XID is not. Explicitly cast it through uintptr_t so we
don't throw build warnings either way.

Signed-off-by: default avatarDaniel Stone <daniels@collabora.com>
parent b25f8aeb
No related branches found
No related tags found
2 merge requests!905color-lcms: Introduction and implementation of LCMS plugin,!730simple-egl opacity fixes and a couple of warning fixes
......@@ -857,7 +857,7 @@ x11_output_switch_mode(struct weston_output *base, struct weston_mode *mode)
} else {
Window xid = (Window) output->window;
const struct gl_renderer_output_options options = {
.window_for_legacy = (EGLNativeWindowType) output->window,
.window_for_legacy = (EGLNativeWindowType) (uintptr_t) output->window,
.window_for_platform = &xid,
.drm_formats = x11_formats,
.drm_formats_count = ARRAY_LENGTH(x11_formats),
......@@ -1037,7 +1037,7 @@ x11_output_enable(struct weston_output *base)
* but eglCreateWindowSurface takes a Window. */
Window xid = (Window) output->window;
const struct gl_renderer_output_options options = {
.window_for_legacy = (EGLNativeWindowType) output->window,
.window_for_legacy = (EGLNativeWindowType) (uintptr_t) output->window,
.window_for_platform = &xid,
.drm_formats = x11_formats,
.drm_formats_count = ARRAY_LENGTH(x11_formats),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment