From: Pierre Ossman Date: Tue, 21 Dec 2010 16:02:39 +0000 (+0000) Subject: We might sometimes end up with an empty copy because of clipping. Make sure X-Git-Tag: v1.0.90~89 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=201983a623a7af39aa69371d7a147788fb1d8bf2;p=tigervnc.git 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 --- 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); }