Porting NX: 64bit problems

Ulrich Sibiller uli42 at gmx.de
Mon Sep 21 04:58:16 PDT 2015


On Thu, Sep 17, 2015 at 4:30 PM, Adam Jackson <ajax at nwnk.net> wrote:
> 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.

Thank you. There's something similar to Xnest.h called Agent.h in the
NX sources but it does not seem to solve the problem completely. The
problem is that XKB exists in the server and in the lib. Still
investigating.

> 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.

This looks promising. However, it means touch a lot of places so I'll
try to solve it with the other suggestion for now.

Thank you,

Uli


More information about the xorg-devel mailing list