diff --git a/src/backends/x11/common/eglonxbackend.cpp b/src/backends/x11/common/eglonxbackend.cpp index c57129750b..00fbcdd00d 100644 --- a/src/backends/x11/common/eglonxbackend.cpp +++ b/src/backends/x11/common/eglonxbackend.cpp @@ -225,7 +225,7 @@ EGLSurface EglOnXBackend::createSurface(xcb_window_t window) // a c style cast as there are (buggy) platforms where the size of the Window // type is not the same as the size of EGLNativeWindowType, reinterpret_cast<>() // may not compile. - surface = eglCreateWindowSurface(eglDisplay(), config(), (EGLNativeWindowType) nativeWindow, nullptr); + surface = eglCreateWindowSurface(eglDisplay(), config(), (EGLNativeWindowType)(uintptr_t)nativeWindow, nullptr); } return surface; diff --git a/src/backends/x11/standalone/eglbackend.cpp b/src/backends/x11/standalone/eglbackend.cpp index 99750d2d08..2173779829 100644 --- a/src/backends/x11/standalone/eglbackend.cpp +++ b/src/backends/x11/standalone/eglbackend.cpp @@ -228,8 +228,11 @@ bool EglPixmapTexturePrivate::create(SurfacePixmapX11 *pixmap) EGL_IMAGE_PRESERVED_KHR, EGL_TRUE, EGL_NONE }; - m_image = eglCreateImageKHR(m_backend->eglDisplay(), EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR, - reinterpret_cast(nativePixmap), attribs); + m_image = eglCreateImageKHR(m_backend->eglDisplay(), + EGL_NO_CONTEXT, + EGL_NATIVE_PIXMAP_KHR, + reinterpret_cast(static_cast(nativePixmap)), + attribs); if (EGL_NO_IMAGE_KHR == m_image) { qCDebug(KWIN_CORE) << "failed to create egl image";