]> source.dussan.org Git - tigervnc.git/commitdiff
We might sometimes end up with an empty copy because of clipping. Make sure
authorPierre Ossman <ossman@cendio.se>
Tue, 21 Dec 2010 16:02:39 +0000 (16:02 +0000)
committerPierre Ossman <ossman@cendio.se>
Tue, 21 Dec 2010 16:02:39 +0000 (16:02 +0000)
we don't waste more CPU cycles on these.

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4229 3789f03b-4d11-0410-bbf8-ca57d06f2519

unix/xserver/hw/vnc/vncHooks.cc

index 2f7b4a23a9d12bfcaa4baaa28c48a882c3ef57d4..52ef42aecffbdab0df44341a7bc157e74298d479 100644 (file)
@@ -410,7 +410,8 @@ static void vncHooksCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
 
   (*pScreen->CopyWindow) (pWin, ptOldOrg, pOldRegion);
 
-  vncHooksScreen->desktop->add_copied(copied.reg, dx, dy);
+  if (REGION_NOTEMPTY(pScreen, copied.reg))
+    vncHooksScreen->desktop->add_copied(copied.reg, dx, dy);
 
   SCREEN_REWRAP(CopyWindow);
 }