aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/render
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-01-08 21:42:21 +0000
committermarha <marha@users.sourceforge.net>2011-01-08 21:42:21 +0000
commitee97a3165b1f07f011cf95804590925b81e8ec96 (patch)
tree58aa78664ad871145a5a0149f9ad60f140f934aa /xorg-server/render
parentc8a34ce9318446bcd8e91e601525a61d6847f28f (diff)
parent432768f75da13ee5343957df6ce5cd316a62929f (diff)
downloadvcxsrv-ee97a3165b1f07f011cf95804590925b81e8ec96.tar.gz
vcxsrv-ee97a3165b1f07f011cf95804590925b81e8ec96.tar.bz2
vcxsrv-ee97a3165b1f07f011cf95804590925b81e8ec96.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/render')
-rw-r--r--xorg-server/render/animcur.c26
-rw-r--r--xorg-server/render/mipict.c3
2 files changed, 21 insertions, 8 deletions
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 fa4ad7f37..db8d43641 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);
}
}