From 432768f75da13ee5343957df6ce5cd316a62929f Mon Sep 17 00:00:00 2001 From: marha Date: Sat, 8 Jan 2011 19:40:59 +0000 Subject: xserver mesa libX11 xkbcomp pixman git update 8/1/2011 --- xorg-server/render/animcur.c | 26 +++++++++++++++++++------- xorg-server/render/mipict.c | 3 ++- 2 files changed, 21 insertions(+), 8 deletions(-) (limited to 'xorg-server/render') diff --git a/xorg-server/render/animcur.c b/xorg-server/render/animcur.c index 505c65c18..fddd9f81b 100644 --- a/xorg-server/render/animcur.c +++ b/xorg-server/render/animcur.c @@ -95,8 +95,6 @@ AnimCurCloseScreen (int index, ScreenPtr pScreen) Bool ret; Unwrap(as, pScreen, CloseScreen); - - Unwrap(as, pScreen, BlockHandler); Unwrap(as, pScreen, CursorLimits); Unwrap(as, pScreen, DisplayCursor); @@ -150,6 +148,7 @@ AnimCurScreenBlockHandler (int screenNum, ScreenPtr pScreen = screenInfo.screens[screenNum]; AnimCurScreenPtr as = GetAnimCurScreen(pScreen); DeviceIntPtr dev; + Bool activeDevice = FALSE; CARD32 now = 0, soonest = ~0; /* earliest time to wakeup again */ @@ -157,7 +156,10 @@ AnimCurScreenBlockHandler (int screenNum, { if (IsPointerDevice(dev) && pScreen == dev->spriteInfo->anim.pScreen) { - if (!now) now = GetTimeInMillis (); + if (!activeDevice) { + now = GetTimeInMillis (); + activeDevice = TRUE; + } if ((INT32) (now - dev->spriteInfo->anim.time) >= 0) { @@ -187,12 +189,15 @@ AnimCurScreenBlockHandler (int screenNum, } } - if (now) + if (activeDevice) AdjustWaitForDelay (pTimeout, soonest - now); Unwrap (as, pScreen, BlockHandler); (*pScreen->BlockHandler) (screenNum, blockData, pTimeout, pReadmask); - Wrap (as, pScreen, BlockHandler, AnimCurScreenBlockHandler); + if (activeDevice) + Wrap (as, pScreen, BlockHandler, AnimCurScreenBlockHandler); + else + as->BlockHandler = NULL; } static Bool @@ -218,6 +223,9 @@ AnimCurDisplayCursor (DeviceIntPtr pDev, pDev->spriteInfo->anim.time = GetTimeInMillis () + ac->elts[0].delay; pDev->spriteInfo->anim.pCursor = pCursor; pDev->spriteInfo->anim.pScreen = pScreen; + + if (!as->BlockHandler) + Wrap(as, pScreen, BlockHandler, AnimCurScreenBlockHandler); } } else @@ -244,8 +252,12 @@ AnimCurSetCursorPosition (DeviceIntPtr pDev, Bool ret; Unwrap (as, pScreen, SetCursorPosition); - if (pDev->spriteInfo->anim.pCursor) + if (pDev->spriteInfo->anim.pCursor) { pDev->spriteInfo->anim.pScreen = pScreen; + + if (!as->BlockHandler) + Wrap(as, pScreen, BlockHandler, AnimCurScreenBlockHandler); + } ret = (*pScreen->SetCursorPosition) (pDev, pScreen, x, y, generateEvent); Wrap (as, pScreen, SetCursorPosition, AnimCurSetCursorPosition); return ret; @@ -330,7 +342,7 @@ AnimCurInit (ScreenPtr pScreen) return FALSE; Wrap(as, pScreen, CloseScreen, AnimCurCloseScreen); - Wrap(as, pScreen, BlockHandler, AnimCurScreenBlockHandler); + as->BlockHandler = NULL; Wrap(as, pScreen, CursorLimits, AnimCurCursorLimits); Wrap(as, pScreen, DisplayCursor, AnimCurDisplayCursor); diff --git a/xorg-server/render/mipict.c b/xorg-server/render/mipict.c index 0f8076243..56d874e25 100644 --- a/xorg-server/render/mipict.c +++ b/xorg-server/render/mipict.c @@ -386,7 +386,8 @@ miCompositeSourceValidate (PicturePtr pPicture, } x += pPicture->pDrawable->x; y += pPicture->pDrawable->y; - (*pScreen->SourceValidate) (pDrawable, x, y, width, height); + (*pScreen->SourceValidate) (pDrawable, x, y, width, height, + pPicture->subWindowMode); } } -- cgit v1.2.3