[PATCH] dix: Fill in errorValue in ChangeGC for tile/stipple/clip BadMatch

Adam Jackson ajax at redhat.com
Fri Jun 17 12:26:41 PDT 2011


Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 dix/gc.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/dix/gc.c b/dix/gc.c
index fc251dd..76b3e41 100644
--- a/dix/gc.c
+++ b/dix/gc.c
@@ -250,6 +250,8 @@ ChangeGC(ClientPtr client, GC *pGC, BITS32 mask, ChangeGCValPtr pUnion)
 		if ((pPixmap->drawable.depth != pGC->depth) ||
 		    (pPixmap->drawable.pScreen != pGC->pScreen))
 		{
+		    if (client)
+			client->errorValue = pPixmap->drawable.id;
 		    error = BadMatch;
 		}
 		else
@@ -266,6 +268,8 @@ ChangeGC(ClientPtr client, GC *pGC, BITS32 mask, ChangeGCValPtr pUnion)
 		if ((pPixmap->drawable.depth != 1) ||
 		    (pPixmap->drawable.pScreen != pGC->pScreen))
 		{
+		    if (client)
+			client->errorValue = pPixmap->drawable.id;
 		    error = BadMatch;
 		}
 		else
@@ -333,6 +337,8 @@ ChangeGC(ClientPtr client, GC *pGC, BITS32 mask, ChangeGCValPtr pUnion)
 		    if ((pPixmap->drawable.depth != 1) ||
 			(pPixmap->drawable.pScreen != pGC->pScreen))
 		    {
+			if (client)
+			    client->errorValue = pPixmap->drawable.id;
 			error = BadMatch;
 			break;
 		    }
-- 
1.7.5.4



More information about the xorg-devel mailing list