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:
parent
7106a77df3
commit
25d871d984
|
@ -277,9 +277,17 @@ SetPictureFilter (PicturePtr pPicture, char *name, int len, xFixed *params, int
|
|||
|
||||
pFilter = PictureFindFilter (screenInfo.screens[0], name, len);
|
||||
|
||||
for (s = 0; s < screenInfo.numScreens; s++) {
|
||||
if (PictureFindFilter (screenInfo.screens[s], name, len) != pFilter)
|
||||
return BadMatch;
|
||||
if (pPicture->pDrawable == NULL) {
|
||||
/* For source pictures, the picture isn't tied to a screen. So, ensure
|
||||
* 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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user