[Bugfix] Don't hook pixmaps in vncHooks, it fixes crash after XDrawArc call.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4220 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/unix/xserver/hw/vnc/vncHooks.cc b/unix/xserver/hw/vnc/vncHooks.cc
index c9a9abf..1f92850 100644
--- a/unix/xserver/hw/vnc/vncHooks.cc
+++ b/unix/xserver/hw/vnc/vncHooks.cc
@@ -625,7 +625,7 @@
};
-// ValidateGC - wrap the "ops" if a drawable window or pixmap
+// ValidateGC - wrap the "ops" if a viewable window
static void vncHooksValidateGC(GCPtr pGC, unsigned long changes,
DrawablePtr pDrawable)
@@ -637,7 +637,7 @@
(*pGC->funcs->ValidateGC) (pGC, changes, pDrawable);
u.vncHooksGC->wrappedOps = 0;
- if (pDrawable->type == DRAWABLE_WINDOW || pDrawable->type == DRAWABLE_PIXMAP) {
+ if (pDrawable->type == DRAWABLE_WINDOW && ((WindowPtr) pDrawable)->viewable) {
u.vncHooksGC->wrappedOps = pGC->ops;
DBGPRINT((stderr,"vncHooksValidateGC: wrapped GC ops\n"));
}