Excerpts from Jamey Sharp's message of Wed Sep 30 22:29:39 -0700 2009: > --- > Somebody at XDC today said that getting rid of the static MAXSCREENS > limit from the X server would be a Good Thing, and it looked like doing > that to Xext/shm.c would be pretty easy, so I tried it.
Thanks for giving this a try. The canonical way to do this is to
allocate a screen private index and then allocate memory per-screen
instead of globally, but your patch is simpler and easier to review.
Check out mi/misprite.c and see the pattern of the form:
static int miSpriteScreenKeyIndex;
static DevPrivateKey miSpriteScreenKey = &miSpriteScreenKeyIndex;
miSpriteInitialize:
pScreenPriv = xalloc (sizeof (miSpriteScreenRec));
...
dixSetPrivate(&pScreen->devPrivates, miSpriteScreenKey, pScreenPriv);
Then, functions which need per-screen info do:
pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey);
You then wrap CloseScreen (in the usual way) and free your private
structure there.
--
[email protected]
signature.asc
Description: PGP signature
_______________________________________________ xorg-devel mailing list [email protected] http://lists.x.org/mailman/listinfo/xorg-devel
