summaryrefslogtreecommitdiffstats
path: root/xorg/server/module/rdpDraw.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg/server/module/rdpDraw.c')
-rw-r--r--xorg/server/module/rdpDraw.c36
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(&reg);
- rdpRegionUninit(&clip);
- return;
}
-
- if ((num_clip_rects > 16) && (num_reg_rects > 16))
+ else
{
- box = rdpRegionExtents(&reg);
- 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(&reg);
+ box1 = *box;
+ box1.x1 += dx;
+ box1.y1 += dy;
+ box1.x2 += dx;
+ box1.y2 += dy;
+ rdpClientConAddAllBox(dev, &box1, &(pWin->drawable));
}
- }
- else
- {
- rdpRegionTranslate(&reg, dx, dy);
- rdpRegionIntersect(&reg, &reg, &clip);
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ else
{
- rdpClientConAddDirtyScreenReg(dev, clientCon, &reg);
- clientCon = clientCon->next;
+ rdpRegionTranslate(&reg, dx, dy);
+ rdpRegionIntersect(&reg, &reg, &clip);
+ rdpClientConAddAllReg(dev, &reg, &(pWin->drawable));
}
}
rdpRegionUninit(&reg);