summaryrefslogtreecommitdiffstats
path: root/xrdp
diff options
context:
space:
mode:
authorjsorg71 <jsorg71>2005-08-20 22:27:57 +0000
committerjsorg71 <jsorg71>2005-08-20 22:27:57 +0000
commita4e3a5fd60f1f935fe1dfbdf24bea4b53a330408 (patch)
treee8d13b143934330febc0da0abb5f2ce5cae2c1bd /xrdp
parent5e69f15cd7897a36aa6f79822e523b2dc7204e32 (diff)
downloadxrdp-proprietary-a4e3a5fd60f1f935fe1dfbdf24bea4b53a330408.tar.gz
xrdp-proprietary-a4e3a5fd60f1f935fe1dfbdf24bea4b53a330408.zip
use srcx and y in paint_rect
Diffstat (limited to 'xrdp')
-rw-r--r--xrdp/xrdp.h2
-rw-r--r--xrdp/xrdp_interface.c6
-rw-r--r--xrdp/xrdp_painter.c12
-rw-r--r--xrdp/xrdp_types.h2
4 files changed, 11 insertions, 11 deletions
diff --git a/xrdp/xrdp.h b/xrdp/xrdp.h
index 76012409..18850579 100644
--- a/xrdp/xrdp.h
+++ b/xrdp/xrdp.h
@@ -303,7 +303,7 @@ server_screen_blt(struct xrdp_mod* mod, int x, int y, int cx, int cy,
int srcx, int srcy);
int DEFAULT_CC
server_paint_rect(struct xrdp_mod* mod, int x, int y, int cx, int cy,
- char* data);
+ char* data, int width, int height, int srcx, int srcy);
int DEFAULT_CC
server_set_pointer(struct xrdp_mod* mod, int x, int y,
char* data, char* mask);
diff --git a/xrdp/xrdp_interface.c b/xrdp/xrdp_interface.c
index bea08cbc..b7cd1760 100644
--- a/xrdp/xrdp_interface.c
+++ b/xrdp/xrdp_interface.c
@@ -136,7 +136,7 @@ server_screen_blt(struct xrdp_mod* mod, int x, int y, int cx, int cy,
/*****************************************************************************/
int DEFAULT_CC
server_paint_rect(struct xrdp_mod* mod, int x, int y, int cx, int cy,
- char* data)
+ char* data, int width, int height, int srcx, int srcy)
{
struct xrdp_wm* wm;
struct xrdp_bitmap* b;
@@ -144,8 +144,8 @@ server_paint_rect(struct xrdp_mod* mod, int x, int y, int cx, int cy,
wm = (struct xrdp_wm*)mod->wm;
p = (struct xrdp_painter*)mod->painter;
- b = xrdp_bitmap_create_with_data(cx, cy, wm->screen->bpp, data, wm);
- xrdp_painter_copy(p, b, wm->screen, x, y, cx, cy, 0, 0);
+ b = xrdp_bitmap_create_with_data(width, height, wm->screen->bpp, data, wm);
+ xrdp_painter_copy(p, b, wm->screen, x, y, cx, cy, srcx, srcy);
xrdp_bitmap_delete(b);
return 0;
}
diff --git a/xrdp/xrdp_painter.c b/xrdp/xrdp_painter.c
index 3800277c..a8d48572 100644
--- a/xrdp/xrdp_painter.c
+++ b/xrdp/xrdp_painter.c
@@ -486,8 +486,8 @@ xrdp_painter_copy(struct xrdp_painter* self,
int bitmap_id;
int cache_id;
int cache_idx;
- int walkx;
- int walky;
+ int dstx;
+ int dsty;
int w;
int h;
@@ -540,8 +540,6 @@ xrdp_painter_copy(struct xrdp_painter* self,
i = srcx;
while (i < src->width)
{
- walkx = x + i;
- walky = y + j;
w = MIN(64, src->width - i);
h = MIN(64, src->height - j);
b = xrdp_bitmap_create(w, h, self->wm->screen->bpp, 0, self->wm);
@@ -549,16 +547,18 @@ xrdp_painter_copy(struct xrdp_painter* self,
bitmap_id = xrdp_cache_add_bitmap(self->wm->cache, b);
cache_id = HIWORD(bitmap_id);
cache_idx = LOWORD(bitmap_id);
+ dstx = (x + i) - srcx;
+ dsty = (y + j) - srcy;
k = 0;
while (xrdp_region_get_rect(region, k, &rect1) == 0)
{
if (rect_intersect(&rect1, &clip_rect, &rect2))
{
- MAKERECT(rect1, walkx, walky, w, h);
+ MAKERECT(rect1, dstx, dsty, w, h);
if (rect_intersect(&rect2, &rect1, &draw_rect))
{
libxrdp_orders_mem_blt(self->session, cache_id, palette_id,
- walkx, walky, w, h, self->rop, 0, 0,
+ dstx, dsty, w, h, self->rop, 0, 0,
cache_idx, &draw_rect);
}
}
diff --git a/xrdp/xrdp_types.h b/xrdp/xrdp_types.h
index 5bf632cc..2821c257 100644
--- a/xrdp/xrdp_types.h
+++ b/xrdp/xrdp_types.h
@@ -39,7 +39,7 @@ struct xrdp_mod
int (*server_screen_blt)(struct xrdp_mod* v, int x, int y, int cx, int cy,
int srcx, int srcy);
int (*server_paint_rect)(struct xrdp_mod* v, int x, int y, int cx, int cy,
- char* data);
+ char* data, int width, int height, int srcx, int srcy);
int (*server_set_pointer)(struct xrdp_mod* v, int x, int y, char* data, char* mask);
int (*server_palette)(struct xrdp_mod* v, int* palette);
int (*server_msg)(struct xrdp_mod* v, char* msg, int code);