summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2012-12-23 14:03:05 -0800
committerJay Sorg <jay.sorg@gmail.com>2012-12-23 14:03:05 -0800
commit842fbc43e050960f75d941ac366a4b889b0b9ef1 (patch)
treea735820416579a36d5a1bba8bc9cb14944024d79
parent6ed3d10096fdf8201bbce9ee0fe3ccacd7afd0b5 (diff)
downloadxrdp-proprietary-842fbc43e050960f75d941ac366a4b889b0b9ef1.tar.gz
xrdp-proprietary-842fbc43e050960f75d941ac366a4b889b0b9ef1.zip
X11rdp: create off screen pixmap if not created on use
-rw-r--r--xorg/X11R7.6/rdp/rdp.h7
-rw-r--r--xorg/X11R7.6/rdp/rdpCopyArea.c8
-rw-r--r--xorg/X11R7.6/rdp/rdpCopyPlane.c2
-rw-r--r--xorg/X11R7.6/rdp/rdpFillPolygon.c2
-rw-r--r--xorg/X11R7.6/rdp/rdpFillSpans.c2
-rw-r--r--xorg/X11R7.6/rdp/rdpImageGlyphBlt.c2
-rw-r--r--xorg/X11R7.6/rdp/rdpImageText16.c2
-rw-r--r--xorg/X11R7.6/rdp/rdpImageText8.c2
-rw-r--r--xorg/X11R7.6/rdp/rdpPolyArc.c2
-rw-r--r--xorg/X11R7.6/rdp/rdpPolyFillArc.c2
-rw-r--r--xorg/X11R7.6/rdp/rdpPolyFillRect.c2
-rw-r--r--xorg/X11R7.6/rdp/rdpPolyGlyphBlt.c2
-rw-r--r--xorg/X11R7.6/rdp/rdpPolyPoint.c2
-rw-r--r--xorg/X11R7.6/rdp/rdpPolyRectangle.c2
-rw-r--r--xorg/X11R7.6/rdp/rdpPolySegment.c2
-rw-r--r--xorg/X11R7.6/rdp/rdpPolyText16.c2
-rw-r--r--xorg/X11R7.6/rdp/rdpPolyText8.c2
-rw-r--r--xorg/X11R7.6/rdp/rdpPolylines.c2
-rw-r--r--xorg/X11R7.6/rdp/rdpPushPixels.c2
-rw-r--r--xorg/X11R7.6/rdp/rdpPutImage.c2
-rw-r--r--xorg/X11R7.6/rdp/rdpSetSpans.c2
-rw-r--r--xorg/X11R7.6/rdp/rdpdraw.c75
-rw-r--r--xorg/X11R7.6/rdp/rdpup.c5
23 files changed, 86 insertions, 47 deletions
diff --git a/xorg/X11R7.6/rdp/rdp.h b/xorg/X11R7.6/rdp/rdp.h
index 572bc6f4..57de4432 100644
--- a/xorg/X11R7.6/rdp/rdp.h
+++ b/xorg/X11R7.6/rdp/rdp.h
@@ -256,7 +256,6 @@ struct _rdpPixmapRec
{
int status;
int rdpindex;
- int allocBytes;
int con_number;
int is_dirty;
int pad0;
@@ -338,7 +337,7 @@ draw_item_remove(rdpPixmapRec* priv, struct rdp_draw_item* di);
int
draw_item_remove_all(rdpPixmapRec* priv);
int
-draw_item_pack(rdpPixmapRec* priv);
+draw_item_pack(PixmapPtr pix, rdpPixmapRec* priv);
int
draw_item_add_img_region(rdpPixmapRec* priv, RegionPtr reg, int opcode,
int type);
@@ -359,7 +358,8 @@ rdpCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
unsigned usage_hint);
Bool
rdpDestroyPixmap(PixmapPtr pPixmap);
-
+int
+xrdp_is_os(PixmapPtr pix, rdpPixmapPtr priv);
Bool
rdpCreateWindow(WindowPtr pWindow);
Bool
@@ -420,7 +420,6 @@ rdpGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
INT16 xSrc, INT16 ySrc, int nlists, GlyphListPtr lists,
GlyphPtr* glyphs);
-
/* rdpinput.c */
int
rdpKeybdProc(DeviceIntPtr pDevice, int onoff);
diff --git a/xorg/X11R7.6/rdp/rdpCopyArea.c b/xorg/X11R7.6/rdp/rdpCopyArea.c
index e064cd0f..0a5e5206 100644
--- a/xorg/X11R7.6/rdp/rdpCopyArea.c
+++ b/xorg/X11R7.6/rdp/rdpCopyArea.c
@@ -403,7 +403,7 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
pDstPixmap = (PixmapPtr)pDst;
pDstPriv = GETPIXPRIV(pDstPixmap);
- if (XRDP_IS_OS(pDstPriv))
+ if (xrdp_is_os(pDstPixmap, pDstPriv))
{
can_do_screen_blt = pGC->alu == GXcopy;
@@ -423,7 +423,7 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
pSrcPixmap = (PixmapPtr)pSrc;
pSrcPriv = GETPIXPRIV(pSrcPixmap);
- if (XRDP_IS_OS(pSrcPriv))
+ if (xrdp_is_os(pSrcPixmap, pSrcPriv))
{
if (pDst->type == DRAWABLE_WINDOW)
{
@@ -442,7 +442,7 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
pDstPixmap = (PixmapPtr)pDst;
pDstPriv = GETPIXPRIV(pDstPixmap);
- if (XRDP_IS_OS(pDstPriv))
+ if (xrdp_is_os(pDstPixmap, pDstPriv))
{
if (g_can_do_pix_to_pix)
{
@@ -472,7 +472,7 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
pDstPixmap = (PixmapPtr)pDst;
pDstPriv = GETPIXPRIV(pDstPixmap);
- if (XRDP_IS_OS(pDstPriv))
+ if (xrdp_is_os(pDstPixmap, pDstPriv))
{
post_process = 1;
diff --git a/xorg/X11R7.6/rdp/rdpCopyPlane.c b/xorg/X11R7.6/rdp/rdpCopyPlane.c
index 42e3f4f8..7ac5d263 100644
--- a/xorg/X11R7.6/rdp/rdpCopyPlane.c
+++ b/xorg/X11R7.6/rdp/rdpCopyPlane.c
@@ -105,7 +105,7 @@ rdpCopyPlane(DrawablePtr pSrc, DrawablePtr pDst,
pDstPixmap = (PixmapPtr)pDst;
pDstPriv = GETPIXPRIV(pDstPixmap);
- if (XRDP_IS_OS(pDstPriv))
+ if (xrdp_is_os(pDstPixmap, pDstPriv))
{
post_process = 1;
diff --git a/xorg/X11R7.6/rdp/rdpFillPolygon.c b/xorg/X11R7.6/rdp/rdpFillPolygon.c
index 11664ae3..e703ad03 100644
--- a/xorg/X11R7.6/rdp/rdpFillPolygon.c
+++ b/xorg/X11R7.6/rdp/rdpFillPolygon.c
@@ -144,7 +144,7 @@ rdpFillPolygon(DrawablePtr pDrawable, GCPtr pGC,
pDstPixmap = (PixmapPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
- if (XRDP_IS_OS(pDstPriv))
+ if (xrdp_is_os(pDstPixmap, pDstPriv))
{
post_process = 1;
diff --git a/xorg/X11R7.6/rdp/rdpFillSpans.c b/xorg/X11R7.6/rdp/rdpFillSpans.c
index b5a13a13..9b719bb4 100644
--- a/xorg/X11R7.6/rdp/rdpFillSpans.c
+++ b/xorg/X11R7.6/rdp/rdpFillSpans.c
@@ -80,7 +80,7 @@ rdpFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nInit,
pDstPixmap = (PixmapPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
- if (XRDP_IS_OS(pDstPriv))
+ if (xrdp_is_os(pDstPixmap, pDstPriv))
{
rdpup_switch_os_surface(pDstPriv->rdpindex);
rdpup_get_pixmap_image_rect(pDstPixmap, &id);
diff --git a/xorg/X11R7.6/rdp/rdpImageGlyphBlt.c b/xorg/X11R7.6/rdp/rdpImageGlyphBlt.c
index a46475e0..7a938e93 100644
--- a/xorg/X11R7.6/rdp/rdpImageGlyphBlt.c
+++ b/xorg/X11R7.6/rdp/rdpImageGlyphBlt.c
@@ -102,7 +102,7 @@ rdpImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
pDstPixmap = (PixmapPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
- if (XRDP_IS_OS(pDstPriv))
+ if (xrdp_is_os(pDstPixmap, pDstPriv))
{
post_process = 1;
diff --git a/xorg/X11R7.6/rdp/rdpImageText16.c b/xorg/X11R7.6/rdp/rdpImageText16.c
index 4e204421..61a34438 100644
--- a/xorg/X11R7.6/rdp/rdpImageText16.c
+++ b/xorg/X11R7.6/rdp/rdpImageText16.c
@@ -100,7 +100,7 @@ rdpImageText16(DrawablePtr pDrawable, GCPtr pGC,
pDstPixmap = (PixmapPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
- if (XRDP_IS_OS(pDstPriv))
+ if (xrdp_is_os(pDstPixmap, pDstPriv))
{
post_process = 1;
diff --git a/xorg/X11R7.6/rdp/rdpImageText8.c b/xorg/X11R7.6/rdp/rdpImageText8.c
index 2c4bbf6d..e714773f 100644
--- a/xorg/X11R7.6/rdp/rdpImageText8.c
+++ b/xorg/X11R7.6/rdp/rdpImageText8.c
@@ -100,7 +100,7 @@ rdpImageText8(DrawablePtr pDrawable, GCPtr pGC,
pDstPixmap = (PixmapPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
- if (XRDP_IS_OS(pDstPriv))
+ if (xrdp_is_os(pDstPixmap, pDstPriv))
{
post_process = 1;
diff --git a/xorg/X11R7.6/rdp/rdpPolyArc.c b/xorg/X11R7.6/rdp/rdpPolyArc.c
index aed23410..965fa170 100644
--- a/xorg/X11R7.6/rdp/rdpPolyArc.c
+++ b/xorg/X11R7.6/rdp/rdpPolyArc.c
@@ -119,7 +119,7 @@ rdpPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
pDstPixmap = (PixmapPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
- if (XRDP_IS_OS(pDstPriv))
+ if (xrdp_is_os(pDstPixmap, pDstPriv))
{
post_process = 1;
diff --git a/xorg/X11R7.6/rdp/rdpPolyFillArc.c b/xorg/X11R7.6/rdp/rdpPolyFillArc.c
index 3941cb50..9bbceb68 100644
--- a/xorg/X11R7.6/rdp/rdpPolyFillArc.c
+++ b/xorg/X11R7.6/rdp/rdpPolyFillArc.c
@@ -119,7 +119,7 @@ rdpPolyFillArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
pDstPixmap = (PixmapPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
- if (XRDP_IS_OS(pDstPriv))
+ if (xrdp_is_os(pDstPixmap, pDstPriv))
{
post_process = 1;
diff --git a/xorg/X11R7.6/rdp/rdpPolyFillRect.c b/xorg/X11R7.6/rdp/rdpPolyFillRect.c
index d1c50e1f..6bbc34ab 100644
--- a/xorg/X11R7.6/rdp/rdpPolyFillRect.c
+++ b/xorg/X11R7.6/rdp/rdpPolyFillRect.c
@@ -99,7 +99,7 @@ rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill,
pDstPixmap = (PixmapPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
- if (XRDP_IS_OS(pDstPriv))
+ if (xrdp_is_os(pDstPixmap, pDstPriv))
{
post_process = 1;
diff --git a/xorg/X11R7.6/rdp/rdpPolyGlyphBlt.c b/xorg/X11R7.6/rdp/rdpPolyGlyphBlt.c
index 505c67eb..825a29ef 100644
--- a/xorg/X11R7.6/rdp/rdpPolyGlyphBlt.c
+++ b/xorg/X11R7.6/rdp/rdpPolyGlyphBlt.c
@@ -102,7 +102,7 @@ rdpPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
pDstPixmap = (PixmapPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
- if (XRDP_IS_OS(pDstPriv))
+ if (xrdp_is_os(pDstPixmap, pDstPriv))
{
post_process = 1;
diff --git a/xorg/X11R7.6/rdp/rdpPolyPoint.c b/xorg/X11R7.6/rdp/rdpPolyPoint.c
index 7c65b602..46eb926b 100644
--- a/xorg/X11R7.6/rdp/rdpPolyPoint.c
+++ b/xorg/X11R7.6/rdp/rdpPolyPoint.c
@@ -150,7 +150,7 @@ rdpPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode,
pDstPixmap = (PixmapPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
- if (XRDP_IS_OS(pDstPriv))
+ if (xrdp_is_os(pDstPixmap, pDstPriv))
{
post_process = 1;
diff --git a/xorg/X11R7.6/rdp/rdpPolyRectangle.c b/xorg/X11R7.6/rdp/rdpPolyRectangle.c
index 8de1e43f..9dd5ad8a 100644
--- a/xorg/X11R7.6/rdp/rdpPolyRectangle.c
+++ b/xorg/X11R7.6/rdp/rdpPolyRectangle.c
@@ -112,7 +112,7 @@ rdpPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nrects,
pDstPixmap = (PixmapPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
- if (XRDP_IS_OS(pDstPriv))
+ if (xrdp_is_os(pDstPixmap, pDstPriv))
{
post_process = 1;
diff --git a/xorg/X11R7.6/rdp/rdpPolySegment.c b/xorg/X11R7.6/rdp/rdpPolySegment.c
index 7f9e5080..85b316f3 100644
--- a/xorg/X11R7.6/rdp/rdpPolySegment.c
+++ b/xorg/X11R7.6/rdp/rdpPolySegment.c
@@ -109,7 +109,7 @@ rdpPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pSegs)
pDstPixmap = (PixmapPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
- if (XRDP_IS_OS(pDstPriv))
+ if (xrdp_is_os(pDstPixmap, pDstPriv))
{
post_process = 1;
diff --git a/xorg/X11R7.6/rdp/rdpPolyText16.c b/xorg/X11R7.6/rdp/rdpPolyText16.c
index 6a2ac476..c2c31dbd 100644
--- a/xorg/X11R7.6/rdp/rdpPolyText16.c
+++ b/xorg/X11R7.6/rdp/rdpPolyText16.c
@@ -103,7 +103,7 @@ rdpPolyText16(DrawablePtr pDrawable, GCPtr pGC,
pDstPixmap = (PixmapPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
- if (XRDP_IS_OS(pDstPriv))
+ if (xrdp_is_os(pDstPixmap, pDstPriv))
{
post_process = 1;
diff --git a/xorg/X11R7.6/rdp/rdpPolyText8.c b/xorg/X11R7.6/rdp/rdpPolyText8.c
index 4dbf1e8a..99b0a045 100644
--- a/xorg/X11R7.6/rdp/rdpPolyText8.c
+++ b/xorg/X11R7.6/rdp/rdpPolyText8.c
@@ -103,7 +103,7 @@ rdpPolyText8(DrawablePtr pDrawable, GCPtr pGC,
pDstPixmap = (PixmapPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
- if (XRDP_IS_OS(pDstPriv))
+ if (xrdp_is_os(pDstPixmap, pDstPriv))
{
post_process = 1;
diff --git a/xorg/X11R7.6/rdp/rdpPolylines.c b/xorg/X11R7.6/rdp/rdpPolylines.c
index 8e05ea57..92b51a71 100644
--- a/xorg/X11R7.6/rdp/rdpPolylines.c
+++ b/xorg/X11R7.6/rdp/rdpPolylines.c
@@ -160,7 +160,7 @@ rdpPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode,
pDstPixmap = (PixmapPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
- if (XRDP_IS_OS(pDstPriv))
+ if (xrdp_is_os(pDstPixmap, pDstPriv))
{
post_process = 1;
diff --git a/xorg/X11R7.6/rdp/rdpPushPixels.c b/xorg/X11R7.6/rdp/rdpPushPixels.c
index 24dc9084..c9458bff 100644
--- a/xorg/X11R7.6/rdp/rdpPushPixels.c
+++ b/xorg/X11R7.6/rdp/rdpPushPixels.c
@@ -96,7 +96,7 @@ rdpPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDst,
pDstPixmap = (PixmapPtr)pDst;
pDstPriv = GETPIXPRIV(pDstPixmap);
- if (XRDP_IS_OS(pDstPriv))
+ if (xrdp_is_os(pDstPixmap, pDstPriv))
{
post_process = 1;
diff --git a/xorg/X11R7.6/rdp/rdpPutImage.c b/xorg/X11R7.6/rdp/rdpPutImage.c
index 2b17695b..4f3764d9 100644
--- a/xorg/X11R7.6/rdp/rdpPutImage.c
+++ b/xorg/X11R7.6/rdp/rdpPutImage.c
@@ -98,7 +98,7 @@ rdpPutImage(DrawablePtr pDst, GCPtr pGC, int depth, int x, int y,
pDstPixmap = (PixmapPtr)pDst;
pDstPriv = GETPIXPRIV(pDstPixmap);
- if (XRDP_IS_OS(pDstPriv))
+ if (xrdp_is_os(pDstPixmap, pDstPriv))
{
post_process = 1;
diff --git a/xorg/X11R7.6/rdp/rdpSetSpans.c b/xorg/X11R7.6/rdp/rdpSetSpans.c
index ae0a0d42..101a2d6b 100644
--- a/xorg/X11R7.6/rdp/rdpSetSpans.c
+++ b/xorg/X11R7.6/rdp/rdpSetSpans.c
@@ -89,7 +89,7 @@ rdpSetSpans(DrawablePtr pDrawable, GCPtr pGC, char *psrc,
pDstPixmap = (PixmapPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
- if (XRDP_IS_OS(pDstPriv))
+ if (xrdp_is_os(pDstPixmap, pDstPriv))
{
post_process = 1;
diff --git a/xorg/X11R7.6/rdp/rdpdraw.c b/xorg/X11R7.6/rdp/rdpdraw.c
index 4843ff21..9734607a 100644
--- a/xorg/X11R7.6/rdp/rdpdraw.c
+++ b/xorg/X11R7.6/rdp/rdpdraw.c
@@ -482,7 +482,7 @@ draw_item_remove_all(rdpPixmapRec *priv)
/******************************************************************************/
int
-draw_item_pack(rdpPixmapRec *priv)
+draw_item_pack(PixmapPtr pix, rdpPixmapRec *priv)
{
struct rdp_draw_item *di;
struct rdp_draw_item *di_prev;
@@ -685,20 +685,6 @@ rdpCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
rv = pScreen->CreatePixmap(pScreen, width, height, depth, usage_hint);
priv = GETPIXPRIV(rv);
priv->rdpindex = -1;
-
- if ((rv->drawable.depth >= g_rdpScreen.depth) &&
- (org_width > 1) && (height > 1))
- {
- priv->allocBytes = width * height * g_Bpp;
- priv->rdpindex = rdpup_add_os_bitmap(rv, priv);
-
- if (priv->rdpindex >= 0)
- {
- priv->status = 1;
- rdpup_create_os_surface(priv->rdpindex, width, height);
- }
- }
-
pScreen->ModifyPixmapHeader(rv, org_width, 0, 0, 0, 0, 0);
pScreen->CreatePixmap = rdpCreatePixmap;
return rv;
@@ -735,6 +721,59 @@ rdpDestroyPixmap(PixmapPtr pPixmap)
return rv;
}
+/*****************************************************************************/
+int
+xrdp_is_os(PixmapPtr pix, rdpPixmapPtr priv)
+{
+ RegionRec reg1;
+ BoxRec box;
+ int width;
+ int height;
+ struct image_data id;
+
+ if (priv->status == 0)
+ {
+ width = pix->drawable.width;
+ height = pix->drawable.height;
+ if ((pix->drawable.depth >= g_rdpScreen.depth) &&
+ (width > 1) && (height > 1))
+ {
+ width = (width + 3) & ~3;
+ priv->rdpindex = rdpup_add_os_bitmap(pix, priv);
+ if (priv->rdpindex >= 0)
+ {
+ priv->status = 1;
+ rdpup_create_os_surface(priv->rdpindex, width, height);
+ box.x1 = 0;
+ box.y1 = 0;
+ box.x2 = width;
+ box.y2 = height;
+ if (g_do_dirty_os)
+ {
+ draw_item_remove_all(priv);
+ RegionInit(&reg1, &box, 0);
+ draw_item_add_img_region(priv, &reg1, GXcopy, RDI_IMGLL);
+ RegionUninit(&reg1);
+ priv->is_dirty = 1;
+ }
+ else
+ {
+ rdpup_get_pixmap_image_rect(pix, &id);
+ rdpup_switch_os_surface(priv->rdpindex);
+ rdpup_begin_update();
+ rdpup_send_area(&id, box.x1, box.y1, box.x2 - box.x1,
+ box.y2 - box.y1);
+ rdpup_end_update();
+ rdpup_switch_os_surface(-1);
+ }
+ return 1;
+ }
+ }
+ return 0;
+ }
+ return 1;
+}
+
/******************************************************************************/
Bool
rdpCreateWindow(WindowPtr pWindow)
@@ -831,8 +870,8 @@ rdpRealizeWindow(WindowPtr pWindow)
LLOGLN(10, ("rdpRealizeWindow:"));
LLOGLN(10, (" pWindow %p id 0x%x pWindow->parent %p id 0x%x x %d "
"y %d width %d height %d",
- pWindow, pWindow->drawable.id,
- pWindow->parent, pWindow->parent->drawable.id,
+ pWindow, (int)(pWindow->drawable.id),
+ pWindow->parent, (int)(pWindow->parent->drawable.id),
pWindow->drawable.x, pWindow->drawable.y,
pWindow->drawable.width, pWindow->drawable.height));
priv->status = 1;
@@ -1223,7 +1262,7 @@ rdpComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
pDstPixmap = (PixmapPtr)p;
pDstPriv = GETPIXPRIV(pDstPixmap);
- if (XRDP_IS_OS(pDstPriv))
+ if (xrdp_is_os(pDstPixmap, pDstPriv))
{
post_process = 1;
diff --git a/xorg/X11R7.6/rdp/rdpup.c b/xorg/X11R7.6/rdp/rdpup.c
index 49cc55ee..c2eafe27 100644
--- a/xorg/X11R7.6/rdp/rdpup.c
+++ b/xorg/X11R7.6/rdp/rdpup.c
@@ -137,6 +137,7 @@ rdpup_disconnect(void)
g_sck_closed = 1;
g_pixmap_byte_total = 0;
g_pixmap_num_used = 0;
+ g_rdpindex = -1;
if (g_max_os_bitmaps > 0)
{
@@ -1833,7 +1834,7 @@ rdpup_check_dirty(PixmapPtr pDirtyPixmap, rdpPixmapRec *pDirtyPriv)
rdpup_switch_os_surface(pDirtyPriv->rdpindex);
rdpup_get_pixmap_image_rect(pDirtyPixmap, &id);
rdpup_begin_update();
- draw_item_pack(pDirtyPriv);
+ draw_item_pack(pDirtyPixmap, pDirtyPriv);
di = pDirtyPriv->draw_item_head;
while (di != 0)
@@ -1958,7 +1959,7 @@ rdpup_check_dirty_screen(rdpPixmapRec *pDirtyPriv)
LLOGLN(10, ("-----------------got dirty"));
rdpup_get_screen_image_rect(&id);
rdpup_begin_update();
- draw_item_pack(pDirtyPriv);
+ draw_item_pack(0, pDirtyPriv);
di = pDirtyPriv->draw_item_head;
while (di != 0)