summaryrefslogtreecommitdiff
path: root/miext/shadow
diff options
context:
space:
mode:
Diffstat (limited to 'miext/shadow')
-rw-r--r--miext/shadow/shadow.c20
-rw-r--r--miext/shadow/shadow.h1
2 files changed, 8 insertions, 13 deletions
diff --git a/miext/shadow/shadow.c b/miext/shadow/shadow.c
index 0dd3604a7..405c4dddb 100644
--- a/miext/shadow/shadow.c
+++ b/miext/shadow/shadow.c
@@ -65,16 +65,15 @@ shadowRedisplay(ScreenPtr pScreen)
}
static void
-shadowBlockHandler(void *data, OSTimePtr pTimeout, void *pRead)
+shadowBlockHandler(ScreenPtr pScreen, void *timeout, void *pRead)
{
- ScreenPtr pScreen = (ScreenPtr) data;
+ shadowBuf(pScreen);
shadowRedisplay(pScreen);
-}
-static void
-shadowWakeupHandler(void *data, int i, void *LastSelectMask)
-{
+ unwrap(pBuf, pScreen, BlockHandler);
+ pScreen->BlockHandler(pScreen, timeout, pRead);
+ wrap(pBuf, pScreen, BlockHandler);
}
static void
@@ -100,6 +99,7 @@ shadowCloseScreen(ScreenPtr pScreen)
unwrap(pBuf, pScreen, GetImage);
unwrap(pBuf, pScreen, CloseScreen);
+ unwrap(pBuf, pScreen, BlockHandler);
shadowRemove(pScreen, pBuf->pPixmap);
DamageDestroy(pBuf->pDamage);
if (pBuf->pPixmap)
@@ -132,6 +132,7 @@ shadowSetup(ScreenPtr pScreen)
wrap(pBuf, pScreen, CloseScreen);
wrap(pBuf, pScreen, GetImage);
+ wrap(pBuf, pScreen, BlockHandler);
pBuf->update = 0;
pBuf->window = 0;
pBuf->pPixmap = 0;
@@ -148,10 +149,6 @@ shadowAdd(ScreenPtr pScreen, PixmapPtr pPixmap, ShadowUpdateProc update,
{
shadowBuf(pScreen);
- if (!RegisterBlockAndWakeupHandlers(shadowBlockHandler, shadowWakeupHandler,
- (void *) pScreen))
- return FALSE;
-
/*
* Map simple rotation values to bitmasks; fortunately,
* these are all unique
@@ -192,7 +189,4 @@ shadowRemove(ScreenPtr pScreen, PixmapPtr pPixmap)
pBuf->closure = 0;
pBuf->pPixmap = 0;
}
-
- RemoveBlockAndWakeupHandlers(shadowBlockHandler, shadowWakeupHandler,
- (void *) pScreen);
}
diff --git a/miext/shadow/shadow.h b/miext/shadow/shadow.h
index 86fa94479..7f22169dc 100644
--- a/miext/shadow/shadow.h
+++ b/miext/shadow/shadow.h
@@ -54,6 +54,7 @@ typedef struct _shadowBuf {
/* screen wrappers */
GetImageProcPtr GetImage;
CloseScreenProcPtr CloseScreen;
+ ScreenBlockHandlerProcPtr BlockHandler;
} shadowBufRec;
/* Match defines from randr extension */