diff --git a/xorg/X11R7.6/rdp/rdpCopyArea.c b/xorg/X11R7.6/rdp/rdpCopyArea.c index 28b05a93..e064cd0f 100644 --- a/xorg/X11R7.6/rdp/rdpCopyArea.c +++ b/xorg/X11R7.6/rdp/rdpCopyArea.c @@ -377,114 +377,102 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, if (pSrc->type == DRAWABLE_WINDOW) { - rdpup_check_dirty_screen(&g_screenPriv); + pSrcWnd = (WindowPtr)pSrc; - if (pDst->type == DRAWABLE_WINDOW) + if (pSrcWnd->viewable) { - pDstWnd = (WindowPtr)pDst; + rdpup_check_dirty_screen(&g_screenPriv); - if (pDstWnd->viewable) + if (pDst->type == DRAWABLE_WINDOW) { - can_do_screen_blt = pGC->alu == GXcopy; + pDstWnd = (WindowPtr)pDst; - if (can_do_screen_blt) + if (pDstWnd->viewable) { - return rdpCopyAreaWndToWnd(pSrcWnd, pDstWnd, pGC, - srcx, srcy, w, h, dstx, dsty); - } - } - } - else if (pDst->type == DRAWABLE_PIXMAP) - { - pDstPixmap = (PixmapPtr)pDst; - pDstPriv = GETPIXPRIV(pDstPixmap); + can_do_screen_blt = pGC->alu == GXcopy; - if (XRDP_IS_OS(pDstPriv)) - { - if (pDst->type == DRAWABLE_WINDOW) - { - pDstWnd = (WindowPtr)pDst; - - if (pDstWnd->viewable) + if (can_do_screen_blt) { - can_do_screen_blt = pGC->alu == GXcopy; - - if (can_do_screen_blt) - { - return rdpCopyAreaWndToWnd(pSrcWnd, pDstWnd, pGC, - srcx, srcy, w, h, dstx, dsty); - } + return rdpCopyAreaWndToWnd(pSrcWnd, pDstWnd, pGC, + srcx, srcy, w, h, dstx, dsty); } } - else if (pDst->type == DRAWABLE_PIXMAP) + } + else if (pDst->type == DRAWABLE_PIXMAP) + { + pDstPixmap = (PixmapPtr)pDst; + pDstPriv = GETPIXPRIV(pDstPixmap); + + if (XRDP_IS_OS(pDstPriv)) { - pDstPixmap = (PixmapPtr)pDst; - pDstPriv = GETPIXPRIV(pDstPixmap); + can_do_screen_blt = pGC->alu == GXcopy; - if (XRDP_IS_OS(pDstPriv)) + if (can_do_screen_blt) { - can_do_screen_blt = pGC->alu == GXcopy; - - if (can_do_screen_blt) - { - rdpup_check_dirty(pDstPixmap, pDstPriv); - return rdpCopyAreaWndToPixmap(pSrcWnd, pDstPixmap, pDstPriv, pGC, - srcx, srcy, w, h, dstx, dsty); - } + rdpup_check_dirty(pDstPixmap, pDstPriv); + return rdpCopyAreaWndToPixmap(pSrcWnd, pDstPixmap, pDstPriv, pGC, + srcx, srcy, w, h, dstx, dsty); } } } } + } - if (pSrc->type == DRAWABLE_PIXMAP) - { - pSrcPixmap = (PixmapPtr)pSrc; - pSrcPriv = GETPIXPRIV(pSrcPixmap); - - if (XRDP_IS_OS(pSrcPriv)) - { - rdpup_check_dirty_screen(&g_screenPriv); - rdpup_check_dirty(pSrcPixmap, pSrcPriv); - return rdpCopyAreaPixmapToWnd(pSrcPixmap, pSrcPriv, pDstWnd, pGC, - srcx, srcy, w, h, dstx, dsty); - } - } - - /* do original call */ - rv = rdpCopyAreaOrg(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty); - - dirty_type = 0; - pDirtyPriv = 0; - post_process = 0; - reset_surface = 0; - got_id = 0; + if (pSrc->type == DRAWABLE_PIXMAP) + { + pSrcPixmap = (PixmapPtr)pSrc; + pSrcPriv = GETPIXPRIV(pSrcPixmap); - if (pDst->type == DRAWABLE_PIXMAP) + if (XRDP_IS_OS(pSrcPriv)) { - pDstPixmap = (PixmapPtr)pDst; - pDstPriv = GETPIXPRIV(pDstPixmap); - - if (XRDP_IS_OS(pDstPriv)) + if (pDst->type == DRAWABLE_WINDOW) { - post_process = 1; + pDstWnd = (WindowPtr)pDst; - if (g_do_dirty_os) + if (pDstWnd->viewable) { - LLOGLN(10, ("rdpCopyArea: gettig dirty")); - pDstPriv->is_dirty = 1; - pDirtyPriv = pDstPriv; - dirty_type = RDI_IMGLL; + rdpup_check_dirty_screen(&g_screenPriv); + rdpup_check_dirty(pSrcPixmap, pSrcPriv); + return rdpCopyAreaPixmapToWnd(pSrcPixmap, pSrcPriv, pDstWnd, pGC, + srcx, srcy, w, h, dstx, dsty); } - else + } + else if (pDst->type == DRAWABLE_PIXMAP) + { + pDstPixmap = (PixmapPtr)pDst; + pDstPriv = GETPIXPRIV(pDstPixmap); + + if (XRDP_IS_OS(pDstPriv)) { - rdpup_switch_os_surface(pDstPriv->rdpindex); - reset_surface = 1; - rdpup_get_pixmap_image_rect(pDstPixmap, &id); - got_id = 1; + if (g_can_do_pix_to_pix) + { + rdpup_check_dirty(pSrcPixmap, pSrcPriv); + rdpup_check_dirty(pDstPixmap, pDstPriv); + return rdpCopyAreaPixmapToPixmap(pSrcPixmap, pSrcPriv, + pDstPixmap, pDstPriv, + pGC, srcx, srcy, w, h, + dstx, dsty); + } } } } - else + } + + /* do original call */ + rv = rdpCopyAreaOrg(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty); + + dirty_type = 0; + pDirtyPriv = 0; + post_process = 0; + reset_surface = 0; + got_id = 0; + + if (pDst->type == DRAWABLE_PIXMAP) + { + pDstPixmap = (PixmapPtr)pDst; + pDstPriv = GETPIXPRIV(pDstPixmap); + + if (XRDP_IS_OS(pDstPriv)) { post_process = 1; @@ -528,16 +516,40 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, } } } + } + + if (!post_process) + { + return rv; + } - if (!post_process) + RegionInit(&clip_reg, NullBox, 0); + cd = rdp_get_clip(&clip_reg, pDst, pGC); + + if (cd == 1) + { + if (dirty_type != 0) { - return rv; + box.x1 = pDst->x + dstx; + box.y1 = pDst->y + dsty; + box.x2 = box.x1 + w; + box.y2 = box.y1 + h; + RegionInit(®1, &box, 0); + draw_item_add_img_region(pDirtyPriv, ®1, GXcopy, dirty_type); + RegionUninit(®1); } + else if (got_id) + { + rdpup_begin_update(); + rdpup_send_area(&id, pDst->x + dstx, pDst->y + dsty, w, h); + rdpup_end_update(); + } + } + else if (cd == 2) + { + num_clips = REGION_NUM_RECTS(&clip_reg); - RegionInit(&clip_reg, NullBox, 0); - cd = rdp_get_clip(&clip_reg, pDst, pGC); - - if (cd == 1) + if (num_clips > 0) { if (dirty_type != 0) { @@ -545,74 +557,50 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, box.y1 = pDst->y + dsty; box.x2 = box.x1 + w; box.y2 = box.y1 + h; - RegionInit(®1, &box, 0); - draw_item_add_img_region(pDirtyPriv, ®1, GXcopy, dirty_type); - RegionUninit(®1); + RegionInit(&box_reg, &box, 0); + RegionIntersect(&clip_reg, &clip_reg, &box_reg); + draw_item_add_img_region(pDirtyPriv, &clip_reg, GXcopy, dirty_type); + RegionUninit(&box_reg); } else if (got_id) { rdpup_begin_update(); - rdpup_send_area(&id, pDst->x + dstx, pDst->y + dsty, w, h); - rdpup_end_update(); - } - } - else if (cd == 2) - { - num_clips = REGION_NUM_RECTS(&clip_reg); + 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 > 0) - { - if (dirty_type != 0) - { - 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); - draw_item_add_img_region(pDirtyPriv, &clip_reg, GXcopy, dirty_type); - RegionUninit(&box_reg); - } - else if (got_id) + if (num_clips < 10) { - 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--) { - for (j = num_clips - 1; j >= 0; j--) - { - box = REGION_RECTS(&clip_reg)[j]; - rdpup_send_area(&id, box.x1, box.y1, box.x2 - box.x1, - box.y2 - box.y1); - } + box = REGION_RECTS(&clip_reg)[j]; + rdpup_send_area(&id, box.x1, box.y1, box.x2 - box.x1, + box.y2 - box.y1); } - else - { - pbox = RegionExtents(&clip_reg); - rdpup_send_area(&id, pbox->x1, pbox->y1, pbox->x2 - pbox->x1, - pbox->y2 - pbox->y1); - } - - RegionUninit(&box_reg); - rdpup_end_update(); } + else + { + pbox = RegionExtents(&clip_reg); + rdpup_send_area(&id, pbox->x1, pbox->y1, pbox->x2 - pbox->x1, + pbox->y2 - pbox->y1); + } + + RegionUninit(&box_reg); + rdpup_end_update(); } } + } - RegionUninit(&clip_reg); - - if (reset_surface) - { - rdpup_switch_os_surface(-1); - } + RegionUninit(&clip_reg); - return rv; + if (reset_surface) + { + rdpup_switch_os_surface(-1); } + + return rv; } diff --git a/xorg/X11R7.6/rdp/rdpCopyPlane.c b/xorg/X11R7.6/rdp/rdpCopyPlane.c index 6c871720..42e3f4f8 100644 --- a/xorg/X11R7.6/rdp/rdpCopyPlane.c +++ b/xorg/X11R7.6/rdp/rdpCopyPlane.c @@ -127,23 +127,26 @@ rdpCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, } else { - pDstWnd = (WindowPtr)pDst; - - if (pDstWnd->viewable) + if (pDst->type == DRAWABLE_WINDOW) { - post_process = 1; + pDstWnd = (WindowPtr)pDst; - if (g_do_dirty_ons) + if (pDstWnd->viewable) { - LLOGLN(0, ("rdpCopyPlane: gettig dirty")); - g_screenPriv.is_dirty = 1; - pDirtyPriv = &g_screenPriv; - dirty_type = RDI_IMGLL; - } - else - { - rdpup_get_screen_image_rect(&id); - got_id = 1; + post_process = 1; + + if (g_do_dirty_ons) + { + LLOGLN(0, ("rdpCopyPlane: gettig dirty")); + g_screenPriv.is_dirty = 1; + pDirtyPriv = &g_screenPriv; + dirty_type = RDI_IMGLL; + } + else + { + rdpup_get_screen_image_rect(&id); + got_id = 1; + } } } } diff --git a/xorg/X11R7.6/rdp/rdpFillPolygon.c b/xorg/X11R7.6/rdp/rdpFillPolygon.c index 6ecba893..11664ae3 100644 --- a/xorg/X11R7.6/rdp/rdpFillPolygon.c +++ b/xorg/X11R7.6/rdp/rdpFillPolygon.c @@ -166,23 +166,26 @@ rdpFillPolygon(DrawablePtr pDrawable, GCPtr pGC, } else { - pDstWnd = (WindowPtr)pDrawable; - - if (pDstWnd->viewable) + if (pDrawable->type == DRAWABLE_WINDOW) { - post_process = 1; + pDstWnd = (WindowPtr)pDrawable; - if (g_do_dirty_ons) - { - LLOGLN(0, ("rdpFillPolygon: gettig dirty")); - g_screenPriv.is_dirty = 1; - pDirtyPriv = &g_screenPriv; - dirty_type = RDI_IMGLL; - } - else + if (pDstWnd->viewable) { - rdpup_get_screen_image_rect(&id); - got_id = 1; + post_process = 1; + + if (g_do_dirty_ons) + { + LLOGLN(0, ("rdpFillPolygon: gettig dirty")); + g_screenPriv.is_dirty = 1; + pDirtyPriv = &g_screenPriv; + dirty_type = RDI_IMGLL; + } + else + { + rdpup_get_screen_image_rect(&id); + got_id = 1; + } } } } diff --git a/xorg/X11R7.6/rdp/rdpFillSpans.c b/xorg/X11R7.6/rdp/rdpFillSpans.c index daadeaf1..b5a13a13 100644 --- a/xorg/X11R7.6/rdp/rdpFillSpans.c +++ b/xorg/X11R7.6/rdp/rdpFillSpans.c @@ -82,21 +82,40 @@ rdpFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nInit, if (XRDP_IS_OS(pDstPriv)) { - return; + rdpup_switch_os_surface(pDstPriv->rdpindex); + rdpup_get_pixmap_image_rect(pDstPixmap, &id); + got_id = 1; } - - RegionInit(&clip_reg, NullBox, 0); - cd = rdp_get_clip(&clip_reg, pDrawable, pGC); - - if (cd == 1) - { - } - else if (cd == 2) + } + else + { + if (pDrawable->type == DRAWABLE_WINDOW) { + pDstWnd = (WindowPtr)pDrawable; + + if (pDstWnd->viewable) + { + rdpup_get_screen_image_rect(&id); + got_id = 1; + } } + } - RegionUninit(&clip_reg); - rdpup_switch_os_surface(-1); + if (!got_id) + { + return; + } + + RegionInit(&clip_reg, NullBox, 0); + cd = rdp_get_clip(&clip_reg, pDrawable, pGC); + + if (cd == 1) + { + } + else if (cd == 2) + { } -} + RegionUninit(&clip_reg); + rdpup_switch_os_surface(-1); +} diff --git a/xorg/X11R7.6/rdp/rdpImageGlyphBlt.c b/xorg/X11R7.6/rdp/rdpImageGlyphBlt.c index af1095af..a46475e0 100644 --- a/xorg/X11R7.6/rdp/rdpImageGlyphBlt.c +++ b/xorg/X11R7.6/rdp/rdpImageGlyphBlt.c @@ -99,22 +99,25 @@ rdpImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, if (pDrawable->type == DRAWABLE_PIXMAP) { - pDstWnd = (WindowPtr)pDrawable; + pDstPixmap = (PixmapPtr)pDrawable; + pDstPriv = GETPIXPRIV(pDstPixmap); - if (pDstWnd->viewable) + if (XRDP_IS_OS(pDstPriv)) { post_process = 1; - if (g_do_dirty_ons) + if (g_do_dirty_os) { - LLOGLN(0, ("rdpImageGlyphBlt: gettig dirty")); - g_screenPriv.is_dirty = 1; - pDirtyPriv = &g_screenPriv; + LLOGLN(10, ("rdpImageGlyphBlt: gettig dirty")); + pDstPriv->is_dirty = 1; + pDirtyPriv = pDstPriv; dirty_type = RDI_IMGLL; } else { - rdpup_get_screen_image_rect(&id); + rdpup_switch_os_surface(pDstPriv->rdpindex); + reset_surface = 1; + rdpup_get_pixmap_image_rect(pDstPixmap, &id); got_id = 1; } } @@ -128,8 +131,19 @@ rdpImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, if (pDstWnd->viewable) { post_process = 1; - rdpup_get_screen_image_rect(&id); - got_id = 1; + + if (g_do_dirty_ons) + { + LLOGLN(0, ("rdpImageGlyphBlt: gettig dirty")); + g_screenPriv.is_dirty = 1; + pDirtyPriv = &g_screenPriv; + dirty_type = RDI_IMGLL; + } + else + { + rdpup_get_screen_image_rect(&id); + got_id = 1; + } } } } diff --git a/xorg/X11R7.6/rdp/rdpImageText16.c b/xorg/X11R7.6/rdp/rdpImageText16.c index 6e3b5262..4e204421 100644 --- a/xorg/X11R7.6/rdp/rdpImageText16.c +++ b/xorg/X11R7.6/rdp/rdpImageText16.c @@ -97,22 +97,25 @@ rdpImageText16(DrawablePtr pDrawable, GCPtr pGC, if (pDrawable->type == DRAWABLE_PIXMAP) { - pDstWnd = (WindowPtr)pDrawable; + pDstPixmap = (PixmapPtr)pDrawable; + pDstPriv = GETPIXPRIV(pDstPixmap); - if (pDstWnd->viewable) + if (XRDP_IS_OS(pDstPriv)) { post_process = 1; - if (g_do_dirty_ons) + if (g_do_dirty_os) { - LLOGLN(0, ("rdpImageText16: gettig dirty")); - g_screenPriv.is_dirty = 1; - pDirtyPriv = &g_screenPriv; - dirty_type = RDI_IMGLL; + LLOGLN(10, ("rdpImageText16: gettig dirty")); + pDstPriv->is_dirty = 1; + pDirtyPriv = pDstPriv; + dirty_type = RDI_IMGLY; } else { - rdpup_get_screen_image_rect(&id); + rdpup_switch_os_surface(pDstPriv->rdpindex); + reset_surface = 1; + rdpup_get_pixmap_image_rect(pDstPixmap, &id); got_id = 1; } } @@ -126,8 +129,19 @@ rdpImageText16(DrawablePtr pDrawable, GCPtr pGC, if (pDstWnd->viewable) { post_process = 1; - rdpup_get_screen_image_rect(&id); - got_id = 1; + + if (g_do_dirty_ons) + { + LLOGLN(0, ("rdpImageText16: gettig dirty")); + g_screenPriv.is_dirty = 1; + pDirtyPriv = &g_screenPriv; + dirty_type = RDI_IMGLL; + } + else + { + rdpup_get_screen_image_rect(&id); + got_id = 1; + } } } } diff --git a/xorg/X11R7.6/rdp/rdpImageText8.c b/xorg/X11R7.6/rdp/rdpImageText8.c index f97d05a9..2c4bbf6d 100644 --- a/xorg/X11R7.6/rdp/rdpImageText8.c +++ b/xorg/X11R7.6/rdp/rdpImageText8.c @@ -97,22 +97,25 @@ rdpImageText8(DrawablePtr pDrawable, GCPtr pGC, if (pDrawable->type == DRAWABLE_PIXMAP) { - pDstWnd = (WindowPtr)pDrawable; + pDstPixmap = (PixmapPtr)pDrawable; + pDstPriv = GETPIXPRIV(pDstPixmap); - if (pDstWnd->viewable) + if (XRDP_IS_OS(pDstPriv)) { post_process = 1; - if (g_do_dirty_ons) + if (g_do_dirty_os) { - LLOGLN(0, ("rdpImageText8: gettig dirty")); - g_screenPriv.is_dirty = 1; - pDirtyPriv = &g_screenPriv; + LLOGLN(10, ("rdpImageText8: gettig dirty")); + pDstPriv->is_dirty = 1; + pDirtyPriv = pDstPriv; dirty_type = RDI_IMGLL; } else { - rdpup_get_screen_image_rect(&id); + rdpup_switch_os_surface(pDstPriv->rdpindex); + reset_surface = 1; + rdpup_get_pixmap_image_rect(pDstPixmap, &id); got_id = 1; } } @@ -126,8 +129,19 @@ rdpImageText8(DrawablePtr pDrawable, GCPtr pGC, if (pDstWnd->viewable) { post_process = 1; - rdpup_get_screen_image_rect(&id); - got_id = 1; + + if (g_do_dirty_ons) + { + LLOGLN(0, ("rdpImageText8: gettig dirty")); + g_screenPriv.is_dirty = 1; + pDirtyPriv = &g_screenPriv; + dirty_type = RDI_IMGLL; + } + else + { + rdpup_get_screen_image_rect(&id); + got_id = 1; + } } } } diff --git a/xorg/X11R7.6/rdp/rdpPolyArc.c b/xorg/X11R7.6/rdp/rdpPolyArc.c index c23a78fb..aed23410 100644 --- a/xorg/X11R7.6/rdp/rdpPolyArc.c +++ b/xorg/X11R7.6/rdp/rdpPolyArc.c @@ -148,33 +148,27 @@ rdpPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs) if (pDstWnd->viewable) { post_process = 1; - rdpup_get_screen_image_rect(&id); - got_id = 1; + + if (g_do_dirty_ons) + { + LLOGLN(0, ("rdpPolyArc: gettig dirty")); + g_screenPriv.is_dirty = 1; + pDirtyPriv = &g_screenPriv; + dirty_type = RDI_IMGLL; + } + else + { + rdpup_get_screen_image_rect(&id); + got_id = 1; + } } } } if (!post_process) { - pDstWnd = (WindowPtr)pDrawable; - - if (pDstWnd->viewable) - { - post_process = 1; - - if (g_do_dirty_ons) - { - LLOGLN(0, ("rdpPolyArc: gettig dirty")); - g_screenPriv.is_dirty = 1; - pDirtyPriv = &g_screenPriv; - dirty_type = RDI_IMGLL; - } - else - { - rdpup_get_screen_image_rect(&id); - got_id = 1; - } - } + g_free(rects); + return; } RegionInit(&clip_reg, NullBox, 0); diff --git a/xorg/X11R7.6/rdp/rdpPolyFillArc.c b/xorg/X11R7.6/rdp/rdpPolyFillArc.c index f3fd27ef..3941cb50 100644 --- a/xorg/X11R7.6/rdp/rdpPolyFillArc.c +++ b/xorg/X11R7.6/rdp/rdpPolyFillArc.c @@ -148,33 +148,27 @@ rdpPolyFillArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs) if (pDstWnd->viewable) { post_process = 1; - rdpup_get_screen_image_rect(&id); - got_id = 1; + + if (g_do_dirty_ons) + { + LLOGLN(0, ("rdpPolyFillArc: gettig dirty")); + g_screenPriv.is_dirty = 1; + pDirtyPriv = &g_screenPriv; + dirty_type = RDI_IMGLL; + } + else + { + rdpup_get_screen_image_rect(&id); + got_id = 1; + } } } } if (!post_process) { - pDstWnd = (WindowPtr)pDrawable; - - if (pDstWnd->viewable) - { - post_process = 1; - - if (g_do_dirty_ons) - { - LLOGLN(0, ("rdpPolyFillArc: gettig dirty")); - g_screenPriv.is_dirty = 1; - pDirtyPriv = &g_screenPriv; - dirty_type = RDI_IMGLL; - } - else - { - rdpup_get_screen_image_rect(&id); - got_id = 1; - } - } + g_free(rects); + return; } RegionInit(&clip_reg, NullBox, 0); diff --git a/xorg/X11R7.6/rdp/rdpPolyFillRect.c b/xorg/X11R7.6/rdp/rdpPolyFillRect.c index 778c8620..d1c50e1f 100644 --- a/xorg/X11R7.6/rdp/rdpPolyFillRect.c +++ b/xorg/X11R7.6/rdp/rdpPolyFillRect.c @@ -96,45 +96,54 @@ rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill, if (pDrawable->type == DRAWABLE_PIXMAP) { - post_process = 1; + pDstPixmap = (PixmapPtr)pDrawable; + pDstPriv = GETPIXPRIV(pDstPixmap); - if (g_do_dirty_os) - { - LLOGLN(10, ("rdpPolyFillRect: gettig dirty")); - pDstPriv->is_dirty = 1; - pDirtyPriv = pDstPriv; - dirty_type = RDI_FILL; - } - else - { - rdpup_switch_os_surface(pDstPriv->rdpindex); - reset_surface = 1; - rdpup_get_pixmap_image_rect(pDstPixmap, &id); - got_id = 1; - } - } - else - { - pDstWnd = (WindowPtr)pDrawable; - - if (pDstWnd->viewable) + if (XRDP_IS_OS(pDstPriv)) { post_process = 1; - if (g_do_dirty_ons) + if (g_do_dirty_os) { - LLOGLN(0, ("rdpPolyFillRect: gettig dirty")); - g_screenPriv.is_dirty = 1; - pDirtyPriv = &g_screenPriv; - dirty_type = RDI_IMGLL; + LLOGLN(10, ("rdpPolyFillRect: gettig dirty")); + pDstPriv->is_dirty = 1; + pDirtyPriv = pDstPriv; + dirty_type = RDI_FILL; } else { - rdpup_get_screen_image_rect(&id); + rdpup_switch_os_surface(pDstPriv->rdpindex); + reset_surface = 1; + rdpup_get_pixmap_image_rect(pDstPixmap, &id); got_id = 1; } } } + else + { + if (pDrawable->type == DRAWABLE_WINDOW) + { + pDstWnd = (WindowPtr)pDrawable; + + if (pDstWnd->viewable) + { + post_process = 1; + + if (g_do_dirty_ons) + { + LLOGLN(0, ("rdpPolyFillRect: gettig dirty")); + g_screenPriv.is_dirty = 1; + pDirtyPriv = &g_screenPriv; + dirty_type = RDI_IMGLL; + } + else + { + rdpup_get_screen_image_rect(&id); + got_id = 1; + } + } + } + } if (!post_process) { diff --git a/xorg/X11R7.6/rdp/rdpPolyGlyphBlt.c b/xorg/X11R7.6/rdp/rdpPolyGlyphBlt.c index 9a9aa22a..505c67eb 100644 --- a/xorg/X11R7.6/rdp/rdpPolyGlyphBlt.c +++ b/xorg/X11R7.6/rdp/rdpPolyGlyphBlt.c @@ -99,22 +99,25 @@ rdpPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, if (pDrawable->type == DRAWABLE_PIXMAP) { - pDstWnd = (WindowPtr)pDrawable; + pDstPixmap = (PixmapPtr)pDrawable; + pDstPriv = GETPIXPRIV(pDstPixmap); - if (pDstWnd->viewable) + if (XRDP_IS_OS(pDstPriv)) { post_process = 1; - if (g_do_dirty_ons) + if (g_do_dirty_os) { - LLOGLN(0, ("rdpPolyGlyphBlt: gettig dirty")); - g_screenPriv.is_dirty = 1; - pDirtyPriv = &g_screenPriv; - dirty_type = RDI_IMGLL; + LLOGLN(10, ("rdpPolyGlyphBlt: gettig dirty")); + pDstPriv->is_dirty = 1; + pDirtyPriv = pDstPriv; + dirty_type = RDI_IMGLY; } else { - rdpup_get_screen_image_rect(&id); + rdpup_switch_os_surface(pDstPriv->rdpindex); + reset_surface = 1; + rdpup_get_pixmap_image_rect(pDstPixmap, &id); got_id = 1; } } @@ -128,8 +131,19 @@ rdpPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, if (pDstWnd->viewable) { post_process = 1; - rdpup_get_screen_image_rect(&id); - got_id = 1; + + if (g_do_dirty_ons) + { + LLOGLN(0, ("rdpPolyGlyphBlt: gettig dirty")); + g_screenPriv.is_dirty = 1; + pDirtyPriv = &g_screenPriv; + dirty_type = RDI_IMGLL; + } + else + { + rdpup_get_screen_image_rect(&id); + got_id = 1; + } } } } diff --git a/xorg/X11R7.6/rdp/rdpPolyPoint.c b/xorg/X11R7.6/rdp/rdpPolyPoint.c index 7ab89106..7c65b602 100644 --- a/xorg/X11R7.6/rdp/rdpPolyPoint.c +++ b/xorg/X11R7.6/rdp/rdpPolyPoint.c @@ -100,25 +100,40 @@ rdpPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, for (i = 0; i < npt; i++) { - pDstWnd = (WindowPtr)pDrawable; + pts[i].x = pDrawable->x + in_pts[i].x; + pts[i].y = pDrawable->y + in_pts[i].y; - if (pDstWnd->viewable) + if (i == 0) { - post_process = 1; + total_box.x1 = pts[0].x; + total_box.y1 = pts[0].y; + total_box.x2 = pts[0].x; + total_box.y2 = pts[0].y; + } + else + { + if (pts[i].x < total_box.x1) + { + total_box.x1 = pts[i].x; + } - if (g_do_dirty_ons) + if (pts[i].y < total_box.y1) { - LLOGLN(0, ("rdpPolyPoint: gettig dirty")); - g_screenPriv.is_dirty = 1; - pDirtyPriv = &g_screenPriv; - dirty_type = RDI_IMGLL; + total_box.y1 = pts[i].y; } - else + + if (pts[i].x > total_box.x2) { - rdpup_get_screen_image_rect(&id); - got_id = 1; + total_box.x2 = pts[i].x; + } + + if (pts[i].y > total_box.y2) + { + total_box.y2 = pts[i].y; } } + + /* todo, use this total_box */ } /* do original call */ @@ -164,8 +179,19 @@ rdpPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, if (pDstWnd->viewable) { post_process = 1; - rdpup_get_screen_image_rect(&id); - got_id = 1; + + if (g_do_dirty_ons) + { + LLOGLN(0, ("rdpPolyPoint: gettig dirty")); + g_screenPriv.is_dirty = 1; + pDirtyPriv = &g_screenPriv; + dirty_type = RDI_IMGLL; + } + else + { + rdpup_get_screen_image_rect(&id); + got_id = 1; + } } } } diff --git a/xorg/X11R7.6/rdp/rdpPolyRectangle.c b/xorg/X11R7.6/rdp/rdpPolyRectangle.c index 3512bf58..8de1e43f 100644 --- a/xorg/X11R7.6/rdp/rdpPolyRectangle.c +++ b/xorg/X11R7.6/rdp/rdpPolyRectangle.c @@ -109,22 +109,25 @@ rdpPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nrects, if (pDrawable->type == DRAWABLE_PIXMAP) { - pDstWnd = (WindowPtr)pDrawable; + pDstPixmap = (PixmapPtr)pDrawable; + pDstPriv = GETPIXPRIV(pDstPixmap); - if (pDstWnd->viewable) + if (XRDP_IS_OS(pDstPriv)) { post_process = 1; - if (g_do_dirty_ons) + if (g_do_dirty_os) { - LLOGLN(0, ("rdpPolyRectangle: gettig dirty")); - g_screenPriv.is_dirty = 1; - pDirtyPriv = &g_screenPriv; + LLOGLN(10, ("rdpPolyRectangle: gettig dirty")); + pDstPriv->is_dirty = 1; + pDirtyPriv = pDstPriv; dirty_type = RDI_IMGLL; } else { - rdpup_get_screen_image_rect(&id); + rdpup_switch_os_surface(pDstPriv->rdpindex); + reset_surface = 1; + rdpup_get_pixmap_image_rect(pDstPixmap, &id); got_id = 1; } } @@ -138,8 +141,19 @@ rdpPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nrects, if (pDstWnd->viewable) { post_process = 1; - rdpup_get_screen_image_rect(&id); - got_id = 1; + + if (g_do_dirty_ons) + { + LLOGLN(0, ("rdpPolyRectangle: gettig dirty")); + g_screenPriv.is_dirty = 1; + pDirtyPriv = &g_screenPriv; + dirty_type = RDI_IMGLL; + } + else + { + rdpup_get_screen_image_rect(&id); + got_id = 1; + } } } } diff --git a/xorg/X11R7.6/rdp/rdpPolySegment.c b/xorg/X11R7.6/rdp/rdpPolySegment.c index e723095c..7f9e5080 100644 --- a/xorg/X11R7.6/rdp/rdpPolySegment.c +++ b/xorg/X11R7.6/rdp/rdpPolySegment.c @@ -138,33 +138,27 @@ rdpPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pSegs) if (pDstWnd->viewable) { post_process = 1; - rdpup_get_screen_image_rect(&id); - got_id = 1; + + if (g_do_dirty_ons) + { + LLOGLN(0, ("rdpPolySegment: gettig dirty")); + g_screenPriv.is_dirty = 1; + pDirtyPriv = &g_screenPriv; + dirty_type = RDI_IMGLL; + } + else + { + rdpup_get_screen_image_rect(&id); + got_id = 1; + } } } } if (!post_process) { - pDstWnd = (WindowPtr)pDrawable; - - if (pDstWnd->viewable) - { - post_process = 1; - - if (g_do_dirty_ons) - { - LLOGLN(0, ("rdpPolySegment: gettig dirty")); - g_screenPriv.is_dirty = 1; - pDirtyPriv = &g_screenPriv; - dirty_type = RDI_IMGLL; - } - else - { - rdpup_get_screen_image_rect(&id); - got_id = 1; - } - } + g_free(segs); + return; } RegionInit(&clip_reg, NullBox, 0); diff --git a/xorg/X11R7.6/rdp/rdpPolyText16.c b/xorg/X11R7.6/rdp/rdpPolyText16.c index 0ae340f7..6a2ac476 100644 --- a/xorg/X11R7.6/rdp/rdpPolyText16.c +++ b/xorg/X11R7.6/rdp/rdpPolyText16.c @@ -100,22 +100,25 @@ rdpPolyText16(DrawablePtr pDrawable, GCPtr pGC, if (pDrawable->type == DRAWABLE_PIXMAP) { - pDstWnd = (WindowPtr)pDrawable; + pDstPixmap = (PixmapPtr)pDrawable; + pDstPriv = GETPIXPRIV(pDstPixmap); - if (pDstWnd->viewable) + if (XRDP_IS_OS(pDstPriv)) { post_process = 1; - if (g_do_dirty_ons) + if (g_do_dirty_os) { - LLOGLN(0, ("rdpPolyText16: gettig dirty")); - g_screenPriv.is_dirty = 1; - pDirtyPriv = &g_screenPriv; - dirty_type = RDI_IMGLL; + LLOGLN(10, ("rdpPolyText16: gettig dirty")); + pDstPriv->is_dirty = 1; + pDirtyPriv = pDstPriv; + dirty_type = RDI_IMGLY; } else { - rdpup_get_screen_image_rect(&id); + rdpup_switch_os_surface(pDstPriv->rdpindex); + reset_surface = 1; + rdpup_get_pixmap_image_rect(pDstPixmap, &id); got_id = 1; } } @@ -129,8 +132,19 @@ rdpPolyText16(DrawablePtr pDrawable, GCPtr pGC, if (pDstWnd->viewable) { post_process = 1; - rdpup_get_screen_image_rect(&id); - got_id = 1; + + if (g_do_dirty_ons) + { + LLOGLN(0, ("rdpPolyText16: gettig dirty")); + g_screenPriv.is_dirty = 1; + pDirtyPriv = &g_screenPriv; + dirty_type = RDI_IMGLL; + } + else + { + rdpup_get_screen_image_rect(&id); + got_id = 1; + } } } } diff --git a/xorg/X11R7.6/rdp/rdpPolyText8.c b/xorg/X11R7.6/rdp/rdpPolyText8.c index 8ca7d695..4dbf1e8a 100644 --- a/xorg/X11R7.6/rdp/rdpPolyText8.c +++ b/xorg/X11R7.6/rdp/rdpPolyText8.c @@ -100,22 +100,25 @@ rdpPolyText8(DrawablePtr pDrawable, GCPtr pGC, if (pDrawable->type == DRAWABLE_PIXMAP) { - pDstWnd = (WindowPtr)pDrawable; + pDstPixmap = (PixmapPtr)pDrawable; + pDstPriv = GETPIXPRIV(pDstPixmap); - if (pDstWnd->viewable) + if (XRDP_IS_OS(pDstPriv)) { post_process = 1; - if (g_do_dirty_ons) + if (g_do_dirty_os) { - LLOGLN(0, ("rdpPolyText8: gettig dirty")); - g_screenPriv.is_dirty = 1; - pDirtyPriv = &g_screenPriv; - dirty_type = RDI_IMGLL; + LLOGLN(10, ("rdpPolyText8: gettig dirty")); + pDstPriv->is_dirty = 1; + pDirtyPriv = pDstPriv; + dirty_type = RDI_IMGLY; } else { - rdpup_get_screen_image_rect(&id); + rdpup_switch_os_surface(pDstPriv->rdpindex); + reset_surface = 1; + rdpup_get_pixmap_image_rect(pDstPixmap, &id); got_id = 1; } } @@ -129,8 +132,19 @@ rdpPolyText8(DrawablePtr pDrawable, GCPtr pGC, if (pDstWnd->viewable) { post_process = 1; - rdpup_get_screen_image_rect(&id); - got_id = 1; + + if (g_do_dirty_ons) + { + LLOGLN(0, ("rdpPolyText8: gettig dirty")); + g_screenPriv.is_dirty = 1; + pDirtyPriv = &g_screenPriv; + dirty_type = RDI_IMGLL; + } + else + { + rdpup_get_screen_image_rect(&id); + got_id = 1; + } } } } diff --git a/xorg/X11R7.6/rdp/rdpPolylines.c b/xorg/X11R7.6/rdp/rdpPolylines.c index 977de9fd..8e05ea57 100644 --- a/xorg/X11R7.6/rdp/rdpPolylines.c +++ b/xorg/X11R7.6/rdp/rdpPolylines.c @@ -182,23 +182,26 @@ rdpPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, } else { - pDstWnd = (WindowPtr)pDrawable; - - if (pDstWnd->viewable) + if (pDrawable->type == DRAWABLE_WINDOW) { - post_process = 1; + pDstWnd = (WindowPtr)pDrawable; - if (g_do_dirty_ons) - { - LLOGLN(0, ("rdpPolylines: gettig dirty")); - g_screenPriv.is_dirty = 1; - pDirtyPriv = &g_screenPriv; - dirty_type = RDI_IMGLL; - } - else + if (pDstWnd->viewable) { - rdpup_get_screen_image_rect(&id); - got_id = 1; + post_process = 1; + + if (g_do_dirty_ons) + { + LLOGLN(0, ("rdpPolylines: gettig dirty")); + g_screenPriv.is_dirty = 1; + pDirtyPriv = &g_screenPriv; + dirty_type = RDI_IMGLL; + } + else + { + rdpup_get_screen_image_rect(&id); + got_id = 1; + } } } } diff --git a/xorg/X11R7.6/rdp/rdpPushPixels.c b/xorg/X11R7.6/rdp/rdpPushPixels.c index be55d25a..24dc9084 100644 --- a/xorg/X11R7.6/rdp/rdpPushPixels.c +++ b/xorg/X11R7.6/rdp/rdpPushPixels.c @@ -93,45 +93,54 @@ rdpPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDst, if (pDst->type == DRAWABLE_PIXMAP) { - post_process = 1; + pDstPixmap = (PixmapPtr)pDst; + pDstPriv = GETPIXPRIV(pDstPixmap); - if (g_do_dirty_os) - { - LLOGLN(10, ("rdpPushPixels: gettig dirty")); - pDstPriv->is_dirty = 1; - pDirtyPriv = pDstPriv; - dirty_type = RDI_IMGLY; - } - else - { - rdpup_switch_os_surface(pDstPriv->rdpindex); - reset_surface = 1; - rdpup_get_pixmap_image_rect(pDstPixmap, &id); - got_id = 1; - } - } - else - { - pDstWnd = (WindowPtr)pDst; - - if (pDstWnd->viewable) + if (XRDP_IS_OS(pDstPriv)) { post_process = 1; - if (g_do_dirty_ons) + if (g_do_dirty_os) { - LLOGLN(0, ("rdpPushPixels: gettig dirty")); - g_screenPriv.is_dirty = 1; - pDirtyPriv = &g_screenPriv; - dirty_type = RDI_IMGLL; + LLOGLN(10, ("rdpPushPixels: gettig dirty")); + pDstPriv->is_dirty = 1; + pDirtyPriv = pDstPriv; + dirty_type = RDI_IMGLY; } else { - rdpup_get_screen_image_rect(&id); + rdpup_switch_os_surface(pDstPriv->rdpindex); + reset_surface = 1; + rdpup_get_pixmap_image_rect(pDstPixmap, &id); got_id = 1; } } } + else + { + if (pDst->type == DRAWABLE_WINDOW) + { + pDstWnd = (WindowPtr)pDst; + + if (pDstWnd->viewable) + { + post_process = 1; + + if (g_do_dirty_ons) + { + LLOGLN(0, ("rdpPushPixels: gettig dirty")); + g_screenPriv.is_dirty = 1; + pDirtyPriv = &g_screenPriv; + dirty_type = RDI_IMGLL; + } + else + { + rdpup_get_screen_image_rect(&id); + got_id = 1; + } + } + } + } if (!post_process) { diff --git a/xorg/X11R7.6/rdp/rdpPutImage.c b/xorg/X11R7.6/rdp/rdpPutImage.c index fde2c0eb..2b17695b 100644 --- a/xorg/X11R7.6/rdp/rdpPutImage.c +++ b/xorg/X11R7.6/rdp/rdpPutImage.c @@ -120,23 +120,26 @@ rdpPutImage(DrawablePtr pDst, GCPtr pGC, int depth, int x, int y, } else { - pDstWnd = (WindowPtr)pDst; - - if (pDstWnd->viewable) + if (pDst->type == DRAWABLE_WINDOW) { - post_process = 1; + pDstWnd = (WindowPtr)pDst; - if (g_do_dirty_ons) - { - LLOGLN(0, ("rdpPutImage: gettig dirty")); - g_screenPriv.is_dirty = 1; - pDirtyPriv = &g_screenPriv; - dirty_type = RDI_IMGLL; - } - else + if (pDstWnd->viewable) { - rdpup_get_screen_image_rect(&id); - got_id = 1; + post_process = 1; + + if (g_do_dirty_ons) + { + LLOGLN(0, ("rdpPutImage: gettig dirty")); + g_screenPriv.is_dirty = 1; + pDirtyPriv = &g_screenPriv; + dirty_type = RDI_IMGLL; + } + else + { + rdpup_get_screen_image_rect(&id); + got_id = 1; + } } } } diff --git a/xorg/X11R7.6/rdp/rdpSetSpans.c b/xorg/X11R7.6/rdp/rdpSetSpans.c index f10208ac..ae0a0d42 100644 --- a/xorg/X11R7.6/rdp/rdpSetSpans.c +++ b/xorg/X11R7.6/rdp/rdpSetSpans.c @@ -91,77 +91,70 @@ rdpSetSpans(DrawablePtr pDrawable, GCPtr pGC, char *psrc, if (XRDP_IS_OS(pDstPriv)) { - pDstPixmap = (PixmapPtr)pDrawable; - pDstPriv = GETPIXPRIV(pDstPixmap); + post_process = 1; - if (XRDP_IS_OS(pDstPriv)) + if (g_do_dirty_os) { - post_process = 1; - - if (g_do_dirty_os) - { - LLOGLN(10, ("rdpSetSpans: gettig dirty")); - pDstPriv->is_dirty = 1; - pDirtyPriv = pDstPriv; - dirty_type = RDI_IMGLY; - } - else - { - rdpup_switch_os_surface(pDstPriv->rdpindex); - reset_surface = 1; - rdpup_get_pixmap_image_rect(pDstPixmap, &id); - got_id = 1; - } + LLOGLN(10, ("rdpSetSpans: gettig dirty")); + pDstPriv->is_dirty = 1; + pDirtyPriv = pDstPriv; + dirty_type = RDI_IMGLY; + } + else + { + rdpup_switch_os_surface(pDstPriv->rdpindex); + reset_surface = 1; + rdpup_get_pixmap_image_rect(pDstPixmap, &id); + got_id = 1; } } - else + } + else + { + if (pDrawable->type == DRAWABLE_WINDOW) { - if (pDrawable->type == DRAWABLE_WINDOW) + pDstWnd = (WindowPtr)pDrawable; + + if (pDstWnd->viewable) { - pDstWnd = (WindowPtr)pDrawable; - - if (pDstWnd->viewable) - { - post_process = 1; - rdpup_get_screen_image_rect(&id); - got_id = 1; - } + post_process = 1; + rdpup_get_screen_image_rect(&id); + got_id = 1; } } + } - if (!post_process) - { - return; - } + if (!post_process) + { + return; + } - RegionInit(&clip_reg, NullBox, 0); - cd = rdp_get_clip(&clip_reg, pDrawable, pGC); + RegionInit(&clip_reg, NullBox, 0); + cd = rdp_get_clip(&clip_reg, pDrawable, pGC); - if (cd == 1) + if (cd == 1) + { + if (dirty_type != 0) { - if (dirty_type != 0) - { - } - else if (got_id) - { - } } - else if (cd == 2) + else if (got_id) { - if (dirty_type != 0) - { - } - else if (got_id) - { - } } - - RegionUninit(&clip_reg); - - if (reset_surface) + } + else if (cd == 2) + { + if (dirty_type != 0) + { + } + else if (got_id) { - rdpup_switch_os_surface(-1); } } -} + RegionUninit(&clip_reg); + + if (reset_surface) + { + rdpup_switch_os_surface(-1); + } +} diff --git a/xorg/X11R7.6/rdp/rdpdraw.c b/xorg/X11R7.6/rdp/rdpdraw.c index f279bdb2..4843ff21 100644 --- a/xorg/X11R7.6/rdp/rdpdraw.c +++ b/xorg/X11R7.6/rdp/rdpdraw.c @@ -1247,24 +1247,27 @@ rdpComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, } else { - pDstWnd = (WindowPtr)p; - - if (pDstWnd->viewable) + if (p->type == DRAWABLE_WINDOW) { - post_process = 1; + pDstWnd = (WindowPtr)p; - if (g_do_dirty_ons) - { - LLOGLN(0, ("rdpComposite: gettig dirty")); - g_screenPriv.is_dirty = 1; - pDirtyPriv = &g_screenPriv; - dirty_type = RDI_IMGLL; - } - else + if (pDstWnd->viewable) { - rdpup_get_screen_image_rect(&id); - got_id = 1; - LLOGLN(10, ("rdpComposite: screen")); + post_process = 1; + + if (g_do_dirty_ons) + { + LLOGLN(0, ("rdpComposite: gettig dirty")); + g_screenPriv.is_dirty = 1; + pDirtyPriv = &g_screenPriv; + dirty_type = RDI_IMGLL; + } + else + { + rdpup_get_screen_image_rect(&id); + got_id = 1; + LLOGLN(10, ("rdpComposite: screen")); + } } } } diff --git a/xorg/X11R7.6/rdp/rdpup.c b/xorg/X11R7.6/rdp/rdpup.c index d6d9b4f9..4cc1b683 100644 --- a/xorg/X11R7.6/rdp/rdpup.c +++ b/xorg/X11R7.6/rdp/rdpup.c @@ -1685,82 +1685,92 @@ rdpup_create_window(WindowPtr pWindow, rdpWindowRec *priv) if (g_connected) { - style = XR_STYLE_NORMAL; - ext_style = XR_EXT_STYLE_NORMAL; - } - - flags = WINDOW_ORDER_TYPE_WINDOW | WINDOW_ORDER_STATE_NEW; - strcpy(title, "title"); - title_bytes = strlen(title); - - num_window_rects = 1; - num_visibility_rects = 1; - - /* calculate bytes */ - bytes = (2 + 2) + (5 * 4) + (2 + title_bytes) + (12 * 4) + - (2 + num_window_rects * 8) + (4 + 4) + - (2 + num_visibility_rects * 8) + 4; - - rdpup_pre_check(bytes); - out_uint16_le(g_out_s, 25); - out_uint16_le(g_out_s, bytes); - g_count++; - out_uint32_le(g_out_s, pWindow->drawable.id); /* window_id */ - out_uint32_le(g_out_s, pWindow->parent->drawable.id); /* owner_window_id */ - flags |= WINDOW_ORDER_FIELD_OWNER; - out_uint32_le(g_out_s, style); /* style */ - out_uint32_le(g_out_s, ext_style); /* extended_style */ - flags |= WINDOW_ORDER_FIELD_STYLE; - out_uint32_le(g_out_s, 0); /* show_state */ - flags |= WINDOW_ORDER_FIELD_SHOW; - out_uint16_le(g_out_s, title_bytes); /* title_info */ - out_uint8a(g_out_s, title, title_bytes); - flags |= WINDOW_ORDER_FIELD_TITLE; - out_uint32_le(g_out_s, 0); /* client_offset_x */ - out_uint32_le(g_out_s, 0); /* client_offset_y */ - flags |= WINDOW_ORDER_FIELD_CLIENT_AREA_OFFSET; - out_uint32_le(g_out_s, pWindow->drawable.width); /* client_area_width */ - out_uint32_le(g_out_s, pWindow->drawable.height); /* client_area_height */ - flags |= WINDOW_ORDER_FIELD_CLIENT_AREA_SIZE; - out_uint32_le(g_out_s, 0); /* rp_content */ - out_uint32_le(g_out_s, root_id); /* root_parent_handle */ - flags |= WINDOW_ORDER_FIELD_ROOT_PARENT; - out_uint32_le(g_out_s, pWindow->drawable.x); /* window_offset_x */ - out_uint32_le(g_out_s, pWindow->drawable.y); /* window_offset_y */ - flags |= WINDOW_ORDER_FIELD_WND_OFFSET; - out_uint32_le(g_out_s, 0); /* window_client_delta_x */ - out_uint32_le(g_out_s, 0); /* window_client_delta_y */ - flags |= WINDOW_ORDER_FIELD_WND_CLIENT_DELTA; - out_uint32_le(g_out_s, pWindow->drawable.width); /* window_width */ - out_uint32_le(g_out_s, pWindow->drawable.height); /* window_height */ - flags |= WINDOW_ORDER_FIELD_WND_SIZE; - out_uint16_le(g_out_s, num_window_rects); /* num_window_rects */ - - for (index = 0; index < num_window_rects; index++) - { - out_uint16_le(g_out_s, 0); /* left */ - out_uint16_le(g_out_s, 0); /* top */ - out_uint16_le(g_out_s, pWindow->drawable.width); /* right */ - out_uint16_le(g_out_s, pWindow->drawable.height); /* bottom */ - } - - flags |= WINDOW_ORDER_FIELD_WND_RECTS; - out_uint32_le(g_out_s, pWindow->drawable.x); /* visible_offset_x */ - out_uint32_le(g_out_s, pWindow->drawable.y); /* visible_offset_y */ - flags |= WINDOW_ORDER_FIELD_VIS_OFFSET; - out_uint16_le(g_out_s, num_visibility_rects); /* num_visibility_rects */ - - for (index = 0; index < num_visibility_rects; index++) - { - out_uint16_le(g_out_s, 0); /* left */ - out_uint16_le(g_out_s, 0); /* top */ - out_uint16_le(g_out_s, pWindow->drawable.width); /* right */ - out_uint16_le(g_out_s, pWindow->drawable.height); /* bottom */ - } - - flags |= WINDOW_ORDER_FIELD_VISIBILITY; - - out_uint32_le(g_out_s, flags); /* flags */ + root_id = pWindow->drawable.pScreen->root->drawable.id; + + if (pWindow->overrideRedirect) + { + style = XR_STYLE_TOOLTIP; + ext_style = XR_EXT_STYLE_TOOLTIP; + } + else + { + style = XR_STYLE_NORMAL; + ext_style = XR_EXT_STYLE_NORMAL; + } + + flags = WINDOW_ORDER_TYPE_WINDOW | WINDOW_ORDER_STATE_NEW; + strcpy(title, "title"); + title_bytes = strlen(title); + + num_window_rects = 1; + num_visibility_rects = 1; + + /* calculate bytes */ + bytes = (2 + 2) + (5 * 4) + (2 + title_bytes) + (12 * 4) + + (2 + num_window_rects * 8) + (4 + 4) + + (2 + num_visibility_rects * 8) + 4; + + rdpup_pre_check(bytes); + out_uint16_le(g_out_s, 25); + out_uint16_le(g_out_s, bytes); + g_count++; + out_uint32_le(g_out_s, pWindow->drawable.id); /* window_id */ + out_uint32_le(g_out_s, pWindow->parent->drawable.id); /* owner_window_id */ + flags |= WINDOW_ORDER_FIELD_OWNER; + out_uint32_le(g_out_s, style); /* style */ + out_uint32_le(g_out_s, ext_style); /* extended_style */ + flags |= WINDOW_ORDER_FIELD_STYLE; + out_uint32_le(g_out_s, 0); /* show_state */ + flags |= WINDOW_ORDER_FIELD_SHOW; + out_uint16_le(g_out_s, title_bytes); /* title_info */ + out_uint8a(g_out_s, title, title_bytes); + flags |= WINDOW_ORDER_FIELD_TITLE; + out_uint32_le(g_out_s, 0); /* client_offset_x */ + out_uint32_le(g_out_s, 0); /* client_offset_y */ + flags |= WINDOW_ORDER_FIELD_CLIENT_AREA_OFFSET; + out_uint32_le(g_out_s, pWindow->drawable.width); /* client_area_width */ + out_uint32_le(g_out_s, pWindow->drawable.height); /* client_area_height */ + flags |= WINDOW_ORDER_FIELD_CLIENT_AREA_SIZE; + out_uint32_le(g_out_s, 0); /* rp_content */ + out_uint32_le(g_out_s, root_id); /* root_parent_handle */ + flags |= WINDOW_ORDER_FIELD_ROOT_PARENT; + out_uint32_le(g_out_s, pWindow->drawable.x); /* window_offset_x */ + out_uint32_le(g_out_s, pWindow->drawable.y); /* window_offset_y */ + flags |= WINDOW_ORDER_FIELD_WND_OFFSET; + out_uint32_le(g_out_s, 0); /* window_client_delta_x */ + out_uint32_le(g_out_s, 0); /* window_client_delta_y */ + flags |= WINDOW_ORDER_FIELD_WND_CLIENT_DELTA; + out_uint32_le(g_out_s, pWindow->drawable.width); /* window_width */ + out_uint32_le(g_out_s, pWindow->drawable.height); /* window_height */ + flags |= WINDOW_ORDER_FIELD_WND_SIZE; + out_uint16_le(g_out_s, num_window_rects); /* num_window_rects */ + + for (index = 0; index < num_window_rects; index++) + { + out_uint16_le(g_out_s, 0); /* left */ + out_uint16_le(g_out_s, 0); /* top */ + out_uint16_le(g_out_s, pWindow->drawable.width); /* right */ + out_uint16_le(g_out_s, pWindow->drawable.height); /* bottom */ + } + + flags |= WINDOW_ORDER_FIELD_WND_RECTS; + out_uint32_le(g_out_s, pWindow->drawable.x); /* visible_offset_x */ + out_uint32_le(g_out_s, pWindow->drawable.y); /* visible_offset_y */ + flags |= WINDOW_ORDER_FIELD_VIS_OFFSET; + out_uint16_le(g_out_s, num_visibility_rects); /* num_visibility_rects */ + + for (index = 0; index < num_visibility_rects; index++) + { + out_uint16_le(g_out_s, 0); /* left */ + out_uint16_le(g_out_s, 0); /* top */ + out_uint16_le(g_out_s, pWindow->drawable.width); /* right */ + out_uint16_le(g_out_s, pWindow->drawable.height); /* bottom */ + } + + flags |= WINDOW_ORDER_FIELD_VISIBILITY; + + out_uint32_le(g_out_s, flags); /* flags */ + } } /******************************************************************************/ @@ -1894,7 +1904,6 @@ rdpup_check_dirty(PixmapPtr pDirtyPixmap, rdpPixmapRec *pDirtyPriv) rdpup_reset_clip(); rdpup_set_opcode(GXcopy); break; - case RDI_SCRBLT: LLOGLN(10, (" RDI_SCRBLT")); break; @@ -1910,9 +1919,9 @@ rdpup_check_dirty(PixmapPtr pDirtyPixmap, rdpPixmapRec *pDirtyPriv) return 0; } - /******************************************************************************/ - int - rdpup_check_dirty_screen(rdpPixmapRec *pDirtyPriv) +/******************************************************************************/ +int +rdpup_check_dirty_screen(rdpPixmapRec *pDirtyPriv) { int index; int clip_index;