On Wed, Dec 01, 2010 at 10:46:36AM +0100, Peter Åstrand wrote:
> 
> >We are casting pDrawable, but with the XDrawArc case, the drawable
> >is not a window but a pixmap. Pixmap structures doesn't have a
> >borderClip member.
> >
> >Why do we need to deal with pixmaps at all? In revision r2452, we started
> 
> If we need to continue hooking pixmap operations, this patch should
> solve the problem:

Patch looks fine for me, feel free to commit it.

> Index: tigervnc/unix/xserver/hw/vnc/vncHooks.cc
> ===================================================================
> --- tigervnc/unix/xserver/hw/vnc/vncHooks.cc  (revision 20732)
> +++ tigervnc/unix/xserver/hw/vnc/vncHooks.cc  (arbetskopia)
> @@ -717,11 +717,12 @@
>  {
>    GC_OP_UNWRAPPER(pDrawable, pGC, FillSpans);
> 
> -  RegionHelper changed(pScreen, &((WindowPtr)pDrawable)->borderClip);
> -
>    (*pGC->ops->FillSpans) (pDrawable, pGC, nInit, pptInit, pwidthInit, 
> fSorted);
> 
> -  vncHooksScreen->desktop->add_changed(changed.reg);
> +  if (pDrawable->type == DRAWABLE_WINDOW) {
> +    RegionHelper changed(pScreen, &((WindowPtr)pDrawable)->borderClip);
> +    vncHooksScreen->desktop->add_changed(changed.reg);
> +  }
>  }
> 
>  // SetSpans - changed region is the whole of borderClip.  This is 
> pessimistic,
> @@ -733,11 +734,12 @@
>  {
>    GC_OP_UNWRAPPER(pDrawable, pGC, SetSpans);
> 
> -  RegionHelper changed(pScreen, &((WindowPtr)pDrawable)->borderClip);
> -
>    (*pGC->ops->SetSpans) (pDrawable, pGC, psrc, ppt, pwidth, nspans, fSorted);
> 
> -  vncHooksScreen->desktop->add_changed(changed.reg);
> +  if (pDrawable->type == DRAWABLE_WINDOW) {
> +    RegionHelper changed(pScreen, &((WindowPtr)pDrawable)->borderClip);
> +    vncHooksScreen->desktop->add_changed(changed.reg);
> +  }
>  }
> 
>  // PutImage - changed region is the given rectangle, clipped by 
> pCompositeClip
> 
> 
> With this patch, the xts suite completes without crashing Xvnc.
> 
> Rgds, ---
> Peter Åstrand         ThinLinc Chief Developer
> Cendio AB             http://www.cendio.com
> Wallenbergs gata 4
> 583 30 Linköping      Phone: +46-13-21 46 00

> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev

> _______________________________________________
> Tigervnc-devel mailing list
> Tigervnc-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tigervnc-devel


-- 
Adam Tkac, Red Hat, Inc.

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Tigervnc-devel mailing list
Tigervnc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-devel

Reply via email to