예제 #1
0
파일: rdpdraw.c 프로젝트: piccolo/xrdp
void
rdpClearToBackground(WindowPtr pWin, int x, int y, int w, int h,
                     Bool generateExposures)
{
    int j;
    BoxRec box;
    RegionRec reg;

    LLOGLN(10, ("in rdpClearToBackground"));
    g_pScreen->ClearToBackground = g_rdpScreen.ClearToBackground;
    g_pScreen->ClearToBackground(pWin, x, y, w, h, generateExposures);

    if (!generateExposures)
    {
        if (w > 0 && h > 0)
        {
            box.x1 = x;
            box.y1 = y;
            box.x2 = box.x1 + w;
            box.y2 = box.y1 + h;
        }
        else
        {
            box.x1 = pWin->drawable.x;
            box.y1 = pWin->drawable.y;
            box.x2 = box.x1 + pWin->drawable.width;
            box.y2 = box.y1 + pWin->drawable.height;
        }

        RegionInit(&reg, &box, 0);
        RegionIntersect(&reg, &reg, &pWin->clipList);

        if (g_do_dirty_ons)
        {
            draw_item_add_img_region(&g_screenPriv, &reg, GXcopy, RDI_IMGLL);
        }
        else
        {
            rdpup_begin_update();

            for (j = REGION_NUM_RECTS(&reg) - 1; j >= 0; j--)
            {
                box = REGION_RECTS(&reg)[j];
                rdpup_send_area(0, box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1);
            }

            rdpup_end_update();
        }

        RegionUninit(&reg);
    }

    g_pScreen->ClearToBackground = rdpClearToBackground;
}
예제 #2
0
파일: rdpdraw.c 프로젝트: mehulsbhatt/xrdp
void
rdpClearToBackground(WindowPtr pWin, int x, int y, int w, int h,
                     Bool generateExposures)
{
  int j;
  BoxRec box;
  RegionRec reg;

  DEBUG_OUT_OPS(("in rdpClearToBackground\n"));
  g_pScreen->ClearToBackground = g_rdpScreen.ClearToBackground;
  g_pScreen->ClearToBackground(pWin, x, y, w, h, generateExposures);
  if (!generateExposures)
  {
    if (w > 0 && h > 0)
    {
      box.x1 = x;
      box.y1 = y;
      box.x2 = box.x1 + w;
      box.y2 = box.y1 + h;
    }
    else
    {
      box.x1 = pWin->drawable.x;
      box.y1 = pWin->drawable.y;
      box.x2 = box.x1 + pWin->drawable.width;
      box.y2 = box.y1 + pWin->drawable.height;
    }
    RegionInit(&reg, &box, 0);
    RegionIntersect(&reg, &reg, &pWin->clipList);
    rdpup_begin_update();
    for (j = REGION_NUM_RECTS(&reg) - 1; j >= 0; j--)
    {
      box = REGION_RECTS(&reg)[j];
      rdpup_send_area(0, box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1);
    }
    rdpup_end_update();
    RegionUninit(&reg);
  }
  g_pScreen->ClearToBackground = rdpClearToBackground;
}