On Tue, 2015-09-01 at 00:09 +0200, Ulrich Sibiller wrote: > So I am looking for some advice how to solve this in a clean fashion. > Is there a document describing how to cleanly use libX11 calls from a > server? Is there some kind of best practice? Code examples? Does > anybody have some glue code that takes care of datatype conversion for that > purpose?
It's not easy or pretty, but it can be done. Xnest is probably the simplest example, hw/xnest/Xnest.h has some boilerplate for renaming types appropriately. DMX has a more complicated version of the same thing. The other option is to strictly segregate the code the way pre-xcb-port Xephyr did, where all the xlib calls are in one file and the server interface in another, and you define your own types to pass stuff back and forth. - ajax _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
