[g-a-devel] ifdefs in the new gnome-mag composite code



Hi,

When I coded the gnome-mag composite code to add full screen magnification with a single display, I tried to follow the same style that was being used, aka, use ifdefs.

During this time I thinked that I was writing a code that was very difficult to read and after read The Practice of Programming book I saw that I was not the only one with this feeling and also discover other problems related with the ifdef use.

So, I want to make the code more ifdef-free. I thinked in this a while, but don't find any reasonable answear for the problem, so I want advices from more experienced ones.

I thinked in make the code compatible with the majority of Xserver (continue with the same design). If have composite, use it. If have Xfixes, use it. If have damage, use it. If don't have any of these, use only native X calls. This way is impossible to make the code ifdef free.

The other way to do the things is break compatibility and consider that the user X server support COMPOSITE, XFIXES and DAMAGE.

I'm really in favor of the second approach.

Best regards,
Carlos.




		
_______________________________________________________ 
Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora! 
http://br.mobile.yahoo.com/mailalertas/ 
 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]