diff options
author | Pierre Ossman <ossman@cendio.se> | 2010-12-21 16:02:39 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2010-12-21 16:02:39 +0000 |
commit | 201983a623a7af39aa69371d7a147788fb1d8bf2 (patch) | |
tree | 59c212f291ca3dd10e0f4fa905e22d2c4ecb220c | |
parent | 329f7d5fac75f20852a5bbbb3a00d47115255b6d (diff) | |
download | tigervnc-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.cc | 3 |
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); } |