summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2013-05-11 13:46:55 -0700
committerJay Sorg <jay.sorg@gmail.com>2013-05-11 13:46:55 -0700
commit1674108d8d227e3babf138523bc7722ed74dc01e (patch)
treead7836433b69ec5026f5b4e692a035a0e121a17a
parent172a8b9f17836ddcdd849ced830d840dc173ccaa (diff)
downloadxrdp-proprietary-1674108d8d227e3babf138523bc7722ed74dc01e.tar.gz
xrdp-proprietary-1674108d8d227e3babf138523bc7722ed74dc01e.zip
use dx, dy in CopyArea PixToPix, not WndToPix
-rw-r--r--xorg/X11R7.6/rdp/rdpCopyArea.c52
1 files changed, 27 insertions, 25 deletions
diff --git a/xorg/X11R7.6/rdp/rdpCopyArea.c b/xorg/X11R7.6/rdp/rdpCopyArea.c
index 0a5e5206..e7ff742c 100644
--- a/xorg/X11R7.6/rdp/rdpCopyArea.c
+++ b/xorg/X11R7.6/rdp/rdpCopyArea.c
@@ -148,8 +148,6 @@ rdpCopyAreaWndToPixmap(WindowPtr pSrcWnd,
int ldstx;
int ldsty;
int num_clips;
- int dx;
- int dy;
int j;
BoxRec box;
RegionPtr rv;
@@ -182,26 +180,12 @@ rdpCopyAreaWndToPixmap(WindowPtr pSrcWnd,
{
rdpup_switch_os_surface(pDstPriv->rdpindex);
rdpup_begin_update();
- dx = dstx - srcx;
- dy = dsty - srcy;
- if ((dy < 0) || ((dy == 0) && (dx < 0)))
- {
- for (j = 0; j < num_clips; j++)
- {
- box = REGION_RECTS(&clip_reg)[j];
- rdpup_set_clip(box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1);
- rdpup_screen_blt(ldstx, ldsty, w, h, lsrcx, lsrcy);
- }
- }
- else
+ for (j = 0; j < num_clips; j++)
{
- for (j = num_clips - 1; j >= 0; j--)
- {
- box = REGION_RECTS(&clip_reg)[j];
- rdpup_set_clip(box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1);
- rdpup_screen_blt(ldstx, ldsty, w, h, lsrcx, lsrcy);
- }
+ box = REGION_RECTS(&clip_reg)[j];
+ rdpup_set_clip(box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1);
+ rdpup_screen_blt(ldstx, ldsty, w, h, lsrcx, lsrcy);
}
rdpup_reset_clip();
@@ -292,6 +276,8 @@ rdpCopyAreaPixmapToPixmap(PixmapPtr pSrcPixmap, rdpPixmapRec *pSrcPriv,
int cd;
int j;
int num_clips;
+ int dx;
+ int dy;
RegionPtr rv;
RegionRec clip_reg;
BoxRec box;
@@ -325,14 +311,30 @@ rdpCopyAreaPixmapToPixmap(PixmapPtr pSrcPixmap, rdpPixmapRec *pSrcPriv,
{
rdpup_switch_os_surface(pDstPriv->rdpindex);
rdpup_begin_update();
+ dx = dstx - srcx;
+ dy = dsty - srcy;
+
LLOGLN(10, ("rdpCopyAreaPixmapToPixmap: num_clips %d", num_clips));
- for (j = 0; j < num_clips; j++)
+ if ((dy < 0) || ((dy == 0) && (dx < 0)))
{
- box = REGION_RECTS(&clip_reg)[j];
- rdpup_set_clip(box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1);
- rdpup_paint_rect_os(ldstx, ldsty, w, h, pSrcPriv->rdpindex, lsrcx, lsrcy);
- LLOGLN(10, ("%d %d %d %d %d %d", ldstx, ldsty, w, h, lsrcx, lsrcy));
+ for (j = 0; j < num_clips; j++)
+ {
+ box = REGION_RECTS(&clip_reg)[j];
+ rdpup_set_clip(box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1);
+ rdpup_paint_rect_os(ldstx, ldsty, w, h, pSrcPriv->rdpindex, lsrcx, lsrcy);
+ LLOGLN(10, ("%d %d %d %d %d %d", ldstx, ldsty, w, h, lsrcx, lsrcy));
+ }
+ }
+ else
+ {
+ for (j = num_clips - 1; j >= 0; j--)
+ {
+ box = REGION_RECTS(&clip_reg)[j];
+ rdpup_set_clip(box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1);
+ rdpup_paint_rect_os(ldstx, ldsty, w, h, pSrcPriv->rdpindex, lsrcx, lsrcy);
+ LLOGLN(10, ("%d %d %d %d %d %d", ldstx, ldsty, w, h, lsrcx, lsrcy));
+ }
}
rdpup_reset_clip();