static int
   gl_renderer_output_create(struct weston_output *output,
                             Window xid,
                             const EGLint *attribs,
                             const EGLint *visual_id)
   {
     ...
     if (gr->create_platform_window) {
       go->egl_surface =
         gr->create_platform_window(gr->egl_display,
                                    egl_config,
                                    (void*)&xid,
                                    NULL);
     } else
       go->egl_surface =
         eglCreateWindowSurface(gr->egl_display,
                                egl_config,
                                (EGLNativeWindowType)xid,
                                NULL);
   }

The void* cast has to read "xid ? (void*)&xid : (void*)0" to handle the NULL correctly that other calls use.

If in fact it actually *writes* the xid (does it?) then the argument has to be a Window* xid_p, and this argument is is just (void*)xid_p while the second one is xid_p?*xid_p:0. I find this doubtful as that would require many changes to the calling code to handle the xid changing.


_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to