[PATCH 1/2] Replace miSpriteCursorFuncRec with direct calls to midispcur.c.

Jamey Sharp jamey at minilop.net
Wed May 19 09:45:23 PDT 2010


On Wed, May 19, 2010 at 5:06 AM, Peter Hutterer
<peter.hutterer at who-t.net> wrote:
>> @@ -861,7 +850,7 @@ miSpriteSetCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
>>               pointer->saved.y1 -= dy;
>>               pointer->saved.x2 -= dx;
>>               pointer->saved.y2 -= dy;
>> -             (void) (*pScreenPriv->funcs->ChangeSave) (pScreen,
>> +             (void) miDCChangeSave(pScreen,
>>                               pointer->saved.x1,
>>                               pointer->saved.y1,
>>                                  pointer->saved.x2 -
>> @@ -870,7 +859,7 @@ miSpriteSetCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
>>                                  pointer->saved.y1,
>>                               dx, dy);
>>           }
>> -         (void) (*pScreenPriv->funcs->MoveCursor) (pScreen, pCursor,
>> +         (void) miDCMoveCursor(pScreen, pCursor,
>
> I'd say this and the one cast above are superfluous.

Worse, they're in an "#if 0" block: "FIXME: Disabled for MPX, should
be rewritten". :-) It's also full of bad indentation.

I'd rather not touch that. I just wanted to record what the intent of
those calls was once the function pointers are gone.

>> @@ -954,13 +940,7 @@ static void
>>  miSpriteDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen)
>>  {
>>      if (DevHasCursor(pDev))
>> -    {
>> -        miSpriteScreenPtr pScreenPriv;
>> -        pScreenPriv = dixLookupPrivate(&pScreen->devPrivates,
>> -                                       miSpriteScreenKey);
>> -
>> -        (*pScreenPriv->funcs->DeviceCursorCleanup)(pDev, pScreen);
>> -    }
>> +        miDCDeviceCleanup(pDev, pScreen);
>
> indentation

I don't know what rule you want me to follow there. This file has
all-spaces in some functions, and mixed spaces/tabs in others. I just
preserved the indentation style that line had already. Anyway, it
looks like spaces-only dominates in this file, in which case I think
this hunk is correct?

>> @@ -984,7 +964,7 @@ miSpriteRemoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen)
>
> urgh, mind fixing up the indentation here?
>
>> @@ -1026,7 +1006,7 @@ miSpriteSaveUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen)
>
> same here

Well, OK.

> I'd like to see the minor nits fixed, but even without that.
> Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

I'll send along the revised patch in a moment. Thanks for reviewing!

Jamey


More information about the xorg-devel mailing list