On Friday, March 20, 2015, Bill Spitzak <<a href="mailto:spitzak@gmail.com">spitzak@gmail.com</a>> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The void* cast has to read "xid ? (void*)&xid : (void*)0" to handle the NULL correctly that other calls use.</blockquote><div><br></div><div>Well, and the minor matter that it breaks all other platforms. Again, see the patch - the Wayland backend passes in a struct wl_surface * to both. Your version would have us passing a wl_surface **, which would be entirely broken. Ditto GBM. Hence the slightly awkward dance.</div><div><br></div><div>Your patch would give us open-coded X11 and non-X11 variants, though I do appreciate the honesty in your prototype taking 'Window xid' as a parameter, hinting at the reality that it does not, in fact, work anywhere else.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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.<br>
</blockquote><div><br></div><div>No, it does not write the XID. </div>