Revision: 4230
http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4230&view=rev
Author: ossman_
Date: 2010-12-21 16:06:36 +0000 (Tue, 21 Dec 2010)
Log Message:
-----------
Sometimes we get copy requests that are partially or fully outside the
framebuffer. Not sure if this is a bug or not, but for now add some handling
to deal with these gracefully.
Modified Paths:
--------------
trunk/unix/xserver/hw/vnc/vncHooks.cc
Modified: trunk/unix/xserver/hw/vnc/vncHooks.cc
===================================================================
--- trunk/unix/xserver/hw/vnc/vncHooks.cc 2010-12-21 16:02:39 UTC (rev
4229)
+++ trunk/unix/xserver/hw/vnc/vncHooks.cc 2010-12-21 16:06:36 UTC (rev
4230)
@@ -400,12 +400,19 @@
int dx, dy;
RegionHelper copied(pScreen, pOldRegion);
+ BoxRec screen_box = {0, 0, pScreen->width, pScreen->height};
+ RegionHelper screen_rgn(pScreen, &screen_box, 1);
+
dx = pWin->drawable.x - ptOldOrg.x;
dy = pWin->drawable.y - ptOldOrg.y;
// RFB tracks copies in terms of destination rectangle, not source.
// We also need to copy with changes to the Window's clipping region.
+ // Finally, make sure we don't get copies to or from regions outside
+ // the framebuffer.
+ REGION_INTERSECT(pScreen, copied.reg, copied.reg, screen_rgn.reg);
REGION_TRANSLATE(pScreen, copied.reg, dx, dy);
+ REGION_INTERSECT(pScreen, copied.reg, copied.reg, screen_rgn.reg);
REGION_INTERSECT(pScreen, copied.reg, copied.reg, &pWin->borderClip);
(*pScreen->CopyWindow) (pWin, ptOldOrg, pOldRegion);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months. Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
_______________________________________________
Tigervnc-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits