[PATCH] Making MPX work with more than one screen (api breaks!)

Paulo Ricardo Zanoni prz05 at c3sl.ufpr.br
Mon Apr 23 13:24:02 PDT 2007

I'm patching and testing again, but I have a few comments about your comments:

Peter Hutterer wrote:
>> +#define rootWindow spriteTrace[0]
> This is a matter of personal taste, but I'd prefer if you'd change the 
> macro. I'm a fan of having macros that look like macros. So 
> RootWindow(dev) which resolves to dev->whatever->whatever is fine. 
> dev->rootWindow to be a macro to resolve to dev->spriteTrace seems 
> confusing. One wonders why you'd have a macro if it's just a rename anyway.

Ok, I've created this:
#define RootWindow(dev) dev->spriteInfo->sprite->spriteTrace[0]

But, there are lots of lines in the code containing stuff like:
pSprite->rootWindow = foobar;

The macro wouldn't apply here, so it would be needed to be:
pSprite->spriteTrace[0] = foobar;

But this is "harder to read" than using rootWindow macro...

Which do you think would be the best solution? Keeping 2 macros? (RootWindow(device) and 

By the way, now I've created these too:
#define EnqueueScreen(dev) dev->spriteInfo->sprite->pEnqueueScreen
#define DequeueScreen(dev) dev->spriteInfo->sprite->pDequeueScreen

> btw, if you can find a better name for spriteTrace, I'm happy to merge 
> that too :)

> please put comments like this into the doxygen comments.
Since mpx didn't merge with master yet, nothing was doxygened yet... But ok, I've put 
doxygen-like comments.

> leave the stub, leave the comment, maybe add a X_DEPRECATED.
Never used X_DEPRECATED.
The only thing I need to do is to add a _X_DEPRECATED before the function code?


Paulo Ricardo Zanoni
C3SL - Centro de Computação Científica e Software Livre

More information about the xorg mailing list