From ae796d43c934ba378c9a618adc81c6729a14b2f8 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 6 Feb 2014 19:17:50 -0800 Subject: [PATCH] ephyr: Repaint entire screen when colormap is updated Any time the colormap is changed, the entire screen needs to be repainted to match. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson Reviewed-by: Eric Anholt --- hw/kdrive/ephyr/ephyr.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index da80c9577..968127308 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -1232,6 +1232,9 @@ ephyrGetColors(ScreenPtr pScreen, int n, xColorItem * pdefs) void ephyrPutColors(ScreenPtr pScreen, int n, xColorItem * pdefs) { + KdScreenPriv(pScreen); + KdScreenInfo *screen = pScreenPriv->screen; + EphyrScrPriv *scrpriv = screen->driver; int min, max, p; /* XXX Not sure if this is right */ @@ -1251,6 +1254,18 @@ ephyrPutColors(ScreenPtr pScreen, int n, xColorItem * pdefs) pdefs->green >> 8, pdefs->blue >> 8); pdefs++; } + if (scrpriv->pDamage) { + BoxRec box; + RegionRec region; + + box.x1 = 0; + box.y1 = 0; + box.x2 = pScreen->width; + box.y2 = pScreen->height; + RegionInit(®ion, &box, 1); + DamageReportDamage(scrpriv->pDamage, ®ion); + RegionUninit(®ion); + } } /* Mouse calls */