Fix source picture filter check for multiple screens.

Now, we only check for filter commonality if we're operating on a source
picture, and we compare the id (screen-independent index of the filter name)
rather than the pointer to the filter (per-screen state).
This commit is contained in:
Eric Anholt 2006-07-03 19:22:26 +02:00
parent 7106a77df3
commit 25d871d984

View File

@ -277,9 +277,17 @@ SetPictureFilter (PicturePtr pPicture, char *name, int len, xFixed *params, int
pFilter = PictureFindFilter (screenInfo.screens[0], name, len); pFilter = PictureFindFilter (screenInfo.screens[0], name, len);
for (s = 0; s < screenInfo.numScreens; s++) { if (pPicture->pDrawable == NULL) {
if (PictureFindFilter (screenInfo.screens[s], name, len) != pFilter) /* For source pictures, the picture isn't tied to a screen. So, ensure
return BadMatch; * that all screens can handle a filter we set for the picture.
*/
for (s = 0; s < screenInfo.numScreens; s++) {
if (PictureFindFilter (screenInfo.screens[s], name, len)->id !=
pFilter->id)
{
return BadMatch;
}
}
} }
if (!pFilter) if (!pFilter)