aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/render
diff options
context:
space:
mode:
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 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);
}
}