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 <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Keith Packard 2014-02-06 19:17:50 -08:00
parent 9eecc9ac73
commit ae796d43c9

View File

@ -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(&region, &box, 1);
DamageReportDamage(scrpriv->pDamage, &region);
RegionUninit(&region);
}
}
/* Mouse calls */