summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2010-12-21 16:02:39 +0000
committerPierre Ossman <ossman@cendio.se>2010-12-21 16:02:39 +0000
commit201983a623a7af39aa69371d7a147788fb1d8bf2 (patch)
tree59c212f291ca3dd10e0f4fa905e22d2c4ecb220c
parent329f7d5fac75f20852a5bbbb3a00d47115255b6d (diff)
downloadtigervnc-201983a623a7af39aa69371d7a147788fb1d8bf2.tar.gz
tigervnc-201983a623a7af39aa69371d7a147788fb1d8bf2.zip
We might sometimes end up with an empty copy because of clipping. Make sure
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
-rw-r--r--unix/xserver/hw/vnc/vncHooks.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/unix/xserver/hw/vnc/vncHooks.cc b/unix/xserver/hw/vnc/vncHooks.cc
index 2f7b4a23..52ef42ae 100644
--- a/unix/xserver/hw/vnc/vncHooks.cc
+++ b/unix/xserver/hw/vnc/vncHooks.cc
@@ -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);
}