server-side xcb

Tomas Carnecky tom at dbservice.com
Sat Jun 19 02:39:43 PDT 2010


(including xcb at lists.fdo as they also might be interested)

The DPMS extension is finally working! Whether it's correctly 
implemented I can't say, but `xset +dpms; xset dpsm force off works`. I 
had a couple problems integrating my part of the code with the rest of 
the code. Maybe DPMS wasn't the best extension to start with: xnest has 
it completely disabled and xfree86 implements it in extmod, both of 
which make it difficult to test the code. Therefore I changed the code 
so that xnest always implements it (even if it is no-op), and in xfree86 
moved the implementation from extmod to built-in. At first I even tried 
to add a configure option to enable/disable my xcb code, but I was 
quickly scared off (blame the autotools).

Next I'll try to implement the basic validations, it should be possible 
because the xcb protocol descriptions sometime include what the valid 
values are for a given field:
    <field type="CARD16" name="power_level" enum="DPMSMode" />
In this particular case it's just a matter of figuring out what DPMSMode 
is and generating the proper code. Once that is in place I could even 
validate replies, events, errors and the code could be reused to 
validate the requests on the client side before the clients sends them 
to the server.

http://github.com/wereHamster/xorg-server/tree/server-side-xcb/proto
The templates generate the ext.h and ext.c files, the user only has to 
implement the actual functions and put them into ext-impl.h. Here I 
simply copied the implementation from Xext/dpms.c into proto/dpms-impl.h.

tom



More information about the xorg-devel mailing list