[PATCH 3/4] Create separate private key for midispcur cursor bits

Tiago Vignatti tiago.vignatti at nokia.com
Mon May 10 10:05:56 PDT 2010


Hi,

On Sat, May 08, 2010 at 08:19:20AM +0200, ext Keith Packard wrote:
> The CursorScreenKey array is supposed to be used by the DDX for cursor
> private data, but midispcur was abusing it to hold cursor bits private
> information. Create a separate set of privates for the dispcur cursor
> bits information.

...

> diff --git a/mi/midispcur.c b/mi/midispcur.c
> index 9041630..71528ee 100644
> --- a/mi/midispcur.c
> +++ b/mi/midispcur.c
> @@ -59,6 +59,9 @@ static DevPrivateKey miDCScreenKey = &miDCScreenKeyIndex;
>  
>  static Bool	miDCCloseScreen(int index, ScreenPtr pScreen);
>  
> +/* per bits per-screen private data */
> +static int miDCCursorBitsKeyIndex[MAXSCREENS];

Why increase the number of privates for mandatory components on Xorg? I guess
the idea, which should be stated very loud, is to extensions and drivers only
use private mechanism. 

And there's much more here (fix-private-usage branch):

    root at xeron:~/xserver-real# git grep -E "dixSetPrivate|dixFreePrivates" mi/
    dix/ hw/xfree86/common/ fb/ composite/ render/ os/ | wc -l
    61


Cheers,

        Tiago


More information about the xorg-devel mailing list