[PATCH xserver] xfixes: Remove the CursorCurrent array
Keith Packard
keithp at keithp.com
Thu Jun 8 21:51:15 UTC 2017
Adam Jackson <ajax at redhat.com> writes:
> We're not wrapping all the ways a cursor can be destroyed, so this array
> ends up with stale data. Rather than try harder to wrap more code paths,
> just look up the cursor when we need it.
I'm pretty sure it doesn't matter -- DisplayCursor is only ever called
while *both* cursors are still valid. Here's the DIX code:
(*pScreen->DisplayCursor) (pDev, pScreen, cursor);
FreeCursor(pSprite->current, (Cursor) 0);
pSprite->current = RefCursor(cursor);
Note that InitializeSprite also sets pSprite->current *before* calling
DisplayCursor, which breaks your assumption. I don't think that matters
as it should only be done before a client could possibly know about the
device?
I can see why you might want to get rid of the magic array; seems like
this should just be using a private in the device.
--
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20170608/5b542880/attachment.sig>
More information about the xorg-devel
mailing list