diff options
Diffstat (limited to 'xorg/server/module/rdpDraw.c')
-rw-r--r-- | xorg/server/module/rdpDraw.c | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/xorg/server/module/rdpDraw.c b/xorg/server/module/rdpDraw.c index 5593ad2c..9d834500 100644 --- a/xorg/server/module/rdpDraw.c +++ b/xorg/server/module/rdpDraw.c @@ -289,7 +289,6 @@ rdpCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr pOldRegion) { ScreenPtr pScreen; rdpPtr dev; - rdpClientCon *clientCon; RegionRec reg; RegionRec clip; int dx; @@ -297,7 +296,9 @@ rdpCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr pOldRegion) int num_clip_rects; int num_reg_rects; BoxPtr box; + BoxRec box1; + LLOGLN(10, ("rdpCopyWindow:")); pScreen = pWin->drawable.pScreen; dev = rdpGetDevFromScreen(pScreen); dev->counts.rdpCopyWindowCallCount++; @@ -318,30 +319,25 @@ rdpCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr pOldRegion) if ((num_clip_rects == 0) || (num_reg_rects == 0)) { - rdpRegionUninit(®); - rdpRegionUninit(&clip); - return; } - - if ((num_clip_rects > 16) && (num_reg_rects > 16)) + else { - box = rdpRegionExtents(®); - clientCon = dev->clientConHead; - while (clientCon != NULL) + if ((num_clip_rects > 16) || (num_reg_rects > 16)) { - rdpClientConAddDirtyScreenBox(dev, clientCon, box); - clientCon = clientCon->next; + LLOGLN(10, ("rdpCopyWindow: big list")); + box = rdpRegionExtents(®); + box1 = *box; + box1.x1 += dx; + box1.y1 += dy; + box1.x2 += dx; + box1.y2 += dy; + rdpClientConAddAllBox(dev, &box1, &(pWin->drawable)); } - } - else - { - rdpRegionTranslate(®, dx, dy); - rdpRegionIntersect(®, ®, &clip); - clientCon = dev->clientConHead; - while (clientCon != NULL) + else { - rdpClientConAddDirtyScreenReg(dev, clientCon, ®); - clientCon = clientCon->next; + rdpRegionTranslate(®, dx, dy); + rdpRegionIntersect(®, ®, &clip); + rdpClientConAddAllReg(dev, ®, &(pWin->drawable)); } } rdpRegionUninit(®); |