diff options
-rw-r--r-- | hw/kdrive/src/kaa.c | 20 | ||||
-rw-r--r-- | hw/kdrive/vesa/vesa.c | 5 |
2 files changed, 12 insertions, 13 deletions
diff --git a/hw/kdrive/src/kaa.c b/hw/kdrive/src/kaa.c index 652e2a898..b4891fa03 100644 --- a/hw/kdrive/src/kaa.c +++ b/hw/kdrive/src/kaa.c @@ -232,9 +232,6 @@ kaaPixmapUseMemory (PixmapPtr pPixmap) static Bool kaaDestroyPixmap (PixmapPtr pPixmap) { - ScreenPtr pScreen = pPixmap->drawable.pScreen; - Bool ret; - if (pPixmap->refcnt == 1) { KaaPixmapPriv (pPixmap); @@ -251,10 +248,7 @@ kaaDestroyPixmap (PixmapPtr pPixmap) pPixmap->devKind = pKaaPixmap->devKind; } } - - ret = fbDestroyPixmap (pPixmap); - - return ret; + return fbDestroyPixmap (pPixmap); } static PixmapPtr @@ -304,17 +298,19 @@ static PixmapPtr kaaGetOffscreenPixmap (DrawablePtr pDrawable, int *xp, int *yp) { PixmapPtr pPixmap; - int x = 0, y = 0; + int x, y; if (pDrawable->type == DRAWABLE_WINDOW) { pPixmap = (*pDrawable->pScreen->GetWindowPixmap) ((WindowPtr) pDrawable); - if (x) - x += pDrawable->x; - if (y) - y += pDrawable->y; + x = pDrawable->x; + y = pDrawable->y; } else + { pPixmap = (PixmapPtr) pDrawable; + x = 0; + y = 0; + } if (kaaPixmapIsOffscreen (pPixmap)) { x += pPixmap->drawable.x; diff --git a/hw/kdrive/vesa/vesa.c b/hw/kdrive/vesa/vesa.c index 9bd7de8b2..38bf609fd 100644 --- a/hw/kdrive/vesa/vesa.c +++ b/hw/kdrive/vesa/vesa.c @@ -1334,7 +1334,7 @@ vesaRandRInit (ScreenPtr pScreen) Bool vesaInitScreen(ScreenPtr pScreen) { - return shadowSetup (pScreen); + return TRUE; } Bool @@ -1344,6 +1344,9 @@ vesaFinishInitScreen (ScreenPtr pScreen) vesaConfigureScreen (pScreen); + if (!shadowSetup (pScreen)) + return FALSE; + pPixmap = vesaGetPixmap (pScreen); if (!pPixmap) return FALSE; |