summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2006-07-03 19:22:26 +0200
committerEric Anholt <anholt@FreeBSD.org>2006-07-03 19:22:26 +0200
commit25d871d98462f0481ee419295ddc94b8c79dc881 (patch)
tree9f9105a725a1a0748a9f5ad2b2077c1ca8c53874 /render
parent7106a77df37c06d2b5568eceeb9297096bff3137 (diff)
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).
Diffstat (limited to 'render')
-rw-r--r--render/filter.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/render/filter.c b/render/filter.c
index 61e040093..71375dae9 100644
--- a/render/filter.c
+++ b/render/filter.c
@@ -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)