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

Peter Hutterer mailinglists at who-t.net
Mon Apr 23 19:07:18 PDT 2007


On 24/04/2007, at 05:54 , Paulo Ricardo Zanoni wrote:
> 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 rootWindow)

I think wherever you have a pSprite you also know the device. So you  
could just use the device instead of pSprite.
the few cases where this doesn't apply you can just use spriteTrace 
[0]  and make a comment.

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

hmm. not overly creative, isn't it :)

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

what I meant was put explanations about the code in general into  
doxygen-like comments.
If you want to, I can wait for your patch before I merge master  
again, to save you the work of redoing your patch.

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

yep. expands to a compiler flag, so gcc complains when you try to use  
the function.

_X_DEPRECATED void foobar()

Cheers,
   Peter

--
Multi-Pointer X Server
http://wearables.unisa.edu.au/mpx





More information about the xorg mailing list