summaryrefslogtreecommitdiffstats
path: root/xorg
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2012-04-06 10:09:20 -0700
committerJay Sorg <jay.sorg@gmail.com>2012-04-06 10:09:20 -0700
commit6588c52aabd129fa5cf06043cf752c9809ef57f7 (patch)
treed3c090c007766d29996da1b571bdd53c01fa9af2 /xorg
parent60a0fda03e947a32b8cf2624556dd8e201e7e50f (diff)
downloadxrdp-proprietary-6588c52aabd129fa5cf06043cf752c9809ef57f7.tar.gz
xrdp-proprietary-6588c52aabd129fa5cf06043cf752c9809ef57f7.zip
xorg: complete CopyPlane Xserver function
Diffstat (limited to 'xorg')
-rw-r--r--xorg/X11R7.6/rdp/rdpdraw.c52
-rw-r--r--xorg/X11R7.6/rdp/rdpinput.c8
2 files changed, 52 insertions, 8 deletions
diff --git a/xorg/X11R7.6/rdp/rdpdraw.c b/xorg/X11R7.6/rdp/rdpdraw.c
index 2a8794d9..9dba7c02 100644
--- a/xorg/X11R7.6/rdp/rdpdraw.c
+++ b/xorg/X11R7.6/rdp/rdpdraw.c
@@ -543,29 +543,65 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
/******************************************************************************/
static RegionPtr
-rdpCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
- GCPtr pGC, int srcx, int srcy, int width, int height,
+rdpCopyPlane(DrawablePtr pSrc, DrawablePtr pDst,
+ GCPtr pGC, int srcx, int srcy, int w, int h,
int dstx, int dsty, unsigned long bitPlane)
{
rdpGCPtr priv;
RegionPtr rv;
- RegionRec reg;
+ RegionRec clip_reg;
+ RegionRec box_reg;
int cd;
+ int num_clips;
+ int j;
GCFuncs* oldFuncs;
+ BoxRec box;
+ BoxPtr pbox;
DEBUG_OUT_OPS(("in rdpCopyPlane\n"));
GC_OP_PROLOGUE(pGC);
- rv = pGC->ops->CopyPlane(pSrcDrawable, pDstDrawable, pGC, srcx, srcy,
- width, height, dstx, dsty, bitPlane);
- RegionInit(&reg, NullBox, 0);
- cd = rdp_get_clip(&reg, pDstDrawable, pGC);
+ rv = pGC->ops->CopyPlane(pSrc, pDst, pGC, srcx, srcy,
+ w, h, dstx, dsty, bitPlane);
+ RegionInit(&clip_reg, NullBox, 0);
+ cd = rdp_get_clip(&clip_reg, pDst, pGC);
if (cd == 1)
{
+ rdpup_begin_update();
+ rdpup_send_area(pDst->x + dstx, pDst->y + dsty, w, h);
+ rdpup_end_update();
}
else if (cd == 2)
{
+ num_clips = REGION_NUM_RECTS(&clip_reg);
+ if (num_clips > 0)
+ {
+ rdpup_begin_update();
+ box.x1 = pDst->x + dstx;
+ box.y1 = pDst->y + dsty;
+ box.x2 = box.x1 + w;
+ box.y2 = box.y1 + h;
+ RegionInit(&box_reg, &box, 0);
+ RegionIntersect(&clip_reg, &clip_reg, &box_reg);
+ num_clips = REGION_NUM_RECTS(&clip_reg);
+ if (num_clips < 10)
+ {
+ for (j = num_clips - 1; j >= 0; j--)
+ {
+ box = REGION_RECTS(&clip_reg)[j];
+ rdpup_send_area(box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1);
+ }
+ }
+ else
+ {
+ pbox = RegionExtents(&clip_reg);
+ rdpup_send_area(pbox->x1, pbox->y1, pbox->x2 - pbox->x1,
+ pbox->y2 - pbox->y1);
+ }
+ RegionUninit(&box_reg);
+ rdpup_end_update();
+ }
}
- RegionUninit(&reg);
+ RegionUninit(&clip_reg);
GC_OP_EPILOGUE(pGC);
return rv;
}
diff --git a/xorg/X11R7.6/rdp/rdpinput.c b/xorg/X11R7.6/rdp/rdpinput.c
index 4e01fcb1..84418dc8 100644
--- a/xorg/X11R7.6/rdp/rdpinput.c
+++ b/xorg/X11R7.6/rdp/rdpinput.c
@@ -679,6 +679,14 @@ rdpEnqueueMotion(int x, int y)
EventListPtr rdp_events;
xEvent* pev;
+# if 0
+ if (x < 128)
+ {
+ rdpup_begin_update();
+ rdpup_send_area(0, 0, 1024, 768);
+ rdpup_end_update();
+ }
+#endif
miPointerSetPosition(g_pointer, &x, &y);
valuators[0] = x;
valuators[1] = y;