Skip to content

Commit

Permalink
Disable SourceValidate in rotation to capture cursor.
Browse files Browse the repository at this point in the history
SourceValidate is used exclusively by the software cursor code to pull the
cursor off of the screen before using the screen as a source operand. This
eliminates the software cursor from the frame buffer while painting the
rotated image though. Disabling this function by temporarily setting the
screen function pointer to NULL causes the cursor image to be captured.
  • Loading branch information
Keith Packard committed Apr 20, 2007
1 parent 8b217de commit 05e1c45
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions hw/xfree86/modes/xf86Rotate.c
Expand Up @@ -278,8 +278,18 @@ xf86RotateRedisplay(ScreenPtr pScreen)
region = DamageRegion(damage);
if (REGION_NOTEMPTY(pScreen, region))
{
int c;

int c;
SourceValidateProcPtr SourceValidate;

/*
* SourceValidate is used by the software cursor code
* to pull the cursor off of the screen when reading
* bits from the frame buffer. Bypassing this function
* leaves the software cursor in place
*/
SourceValidate = pScreen->SourceValidate;
pScreen->SourceValidate = NULL;

for (c = 0; c < xf86_config->num_crtc; c++)
{
xf86CrtcPtr crtc = xf86_config->crtc[c];
Expand All @@ -304,6 +314,7 @@ xf86RotateRedisplay(ScreenPtr pScreen)
REGION_UNINIT (pScreen, &crtc_damage);
}
}
pScreen->SourceValidate = SourceValidate;
DamageEmpty(damage);
}
}
Expand Down

0 comments on commit 05e1c45

Please sign in to comment.