diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2006-11-21 20:31:30 +1030 |
---|---|---|
committer | Peter Hutterer <whot@hyena.localdomain> | 2006-11-21 20:31:30 +1030 |
commit | efd4f3c6ffec804c68ba5df17cc117da264fb7c4 (patch) | |
tree | a556a2eaf6ff8c10559696c27c81eef212d503e6 /mi/mispritest.h | |
parent | 9db851c22d4befb95bfb074b96620261d8e32ac9 (diff) |
dix: WindowsRestructured() calls CheckMotion() on all devices
mi: core pointer was checked twice in miSpriteReportDamage,
miSpriteInstallColormap, miSpriteStoreColors, miSpriteSaveDoomedAreas
and miSpriteRealiseCursor
using damage bug (see comment in file) to avoid artefacts
Diffstat (limited to 'mi/mispritest.h')
-rw-r--r-- | mi/mispritest.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/mi/mispritest.h b/mi/mispritest.h index ff4bb4a7d..0ba5365ad 100644 --- a/mi/mispritest.h +++ b/mi/mispritest.h @@ -97,17 +97,26 @@ typedef struct { #define MASK_COLOR 1 static int damageRegister = 0; +/* + * FIXME: MPX uses a bug at the moment. The semaphore system in place will + * call miSpriteIsUpTRUE multiple times and thus DamageUnregister() will never + * be called in miSpriteIsUpFALSE. + * This gets rid of cursor rendering artefacts but I don't know how this + * affects applications. + * Without any semaphore system in place DamageRegister will be called twice + * and segfault. + */ #define miSpriteIsUpTRUE(pDevCursor, pScreen, pScreenPriv) if (!pDevCursor->isUp) { \ pDevCursor->isUp = TRUE; \ if (!damageRegister ) { \ - damageRegister++; \ DamageRegister (&(*pScreen->GetScreenPixmap) (pScreen)->drawable, pScreenPriv->pDamage); \ } \ + damageRegister++; \ } #define miSpriteIsUpFALSE(pDevCursor, pScreen, pScreenPriv) if (pDevCursor->isUp) { \ - if (damageRegister) { \ - damageRegister--; \ + damageRegister--; \ + if (!damageRegister) { \ DamageUnregister (&(*pScreen->GetScreenPixmap) (pScreen)->drawable, pScreenPriv->pDamage); \ } \ pDevCursor->isUp = FALSE; \ |