From f4b8798a1d4f527092980159b9de8b0c3d74c255 Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Fri, 9 Aug 2013 20:07:24 -0700 Subject: [PATCH] X11rdp: fixes for the merge, offscreen fix --- xorg/X11R7.6/rdp/rdp.h | 1 + xorg/X11R7.6/rdp/rdpComposite.c | 11 ----------- xorg/X11R7.6/rdp/rdpdraw.c | 21 +++++++++++++++++++-- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/xorg/X11R7.6/rdp/rdp.h b/xorg/X11R7.6/rdp/rdp.h index c2d94430..83a64c85 100644 --- a/xorg/X11R7.6/rdp/rdp.h +++ b/xorg/X11R7.6/rdp/rdp.h @@ -296,6 +296,7 @@ struct _rdpPixmapRec then we force remote the pixmap */ int use_count; int kind_width; + int is_scratch; struct rdp_draw_item* draw_item_head; struct rdp_draw_item* draw_item_tail; }; diff --git a/xorg/X11R7.6/rdp/rdpComposite.c b/xorg/X11R7.6/rdp/rdpComposite.c index ec161994..57661520 100644 --- a/xorg/X11R7.6/rdp/rdpComposite.c +++ b/xorg/X11R7.6/rdp/rdpComposite.c @@ -487,17 +487,6 @@ check_drawables(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, #endif } } - if (rv != 0) - { - /* TODO: figure out why source XRGB does not work - skipping for now because they rarely happen - happens when drawing Firefox open file dialog, the button icons */ - if (PIXMAN_FORMAT_A(pSrc->format) == 0) - { - rv = 0; - LLOGLN(10, ("check_drawables: src format")); - } - } if (rv == 0) { LLOGLN(10, ("check_drawables: can not remote [%s]", g_com_fail_strings[fail_reason])); diff --git a/xorg/X11R7.6/rdp/rdpdraw.c b/xorg/X11R7.6/rdp/rdpdraw.c index 99ada0c5..28ab4aba 100644 --- a/xorg/X11R7.6/rdp/rdpdraw.c +++ b/xorg/X11R7.6/rdp/rdpdraw.c @@ -992,6 +992,11 @@ rdpCreatePixmap(ScreenPtr pScreen, int width, int height, int depth, priv->con_number = g_con_number; priv->kind_width = width; pScreen->ModifyPixmapHeader(rv, org_width, 0, 0, 0, 0, 0); + if ((org_width == 0) && (height == 0)) + { + LLOGLN(10, ("rdpCreatePixmap: setting is_scratch")); + priv->is_scratch = 1; + } return rv; } @@ -1036,6 +1041,10 @@ xrdp_is_os(PixmapPtr pix, rdpPixmapPtr priv) int height; struct image_data id; + if (g_wrapPixmap == 0) + { + return 0; + } if (priv->status == 0) { width = pix->drawable.width; @@ -1043,7 +1052,8 @@ xrdp_is_os(PixmapPtr pix, rdpPixmapPtr priv) if ((pix->usage_hint == 0) && (pix->drawable.depth >= g_rdpScreen.depth) && (width > 0) && (height > 0) && - (priv->use_count > XRDP_USE_COUNT_THRESHOLD)) + (priv->use_count > XRDP_USE_COUNT_THRESHOLD) && + (priv->is_scratch == 0)) { width = (width + 3) & ~3; priv->rdpindex = rdpup_add_os_bitmap(pix, priv); @@ -1076,10 +1086,18 @@ xrdp_is_os(PixmapPtr pix, rdpPixmapPtr priv) priv->use_count++; return 1; } + else + { + LLOGLN(10, ("xrdp_is_os: rdpup_add_os_bitmap failed")); + } } priv->use_count++; return 0; } + else + { + LLOGLN(10, ("xrdp_is_os: ok")); + } priv->use_count++; return 1; } @@ -1542,4 +1560,3 @@ rdpSaveScreen(ScreenPtr pScreen, int on) { return 1; } -