summaryrefslogtreecommitdiffstats
path: root/libxrdp
diff options
context:
space:
mode:
Diffstat (limited to 'libxrdp')
-rw-r--r--libxrdp/libxrdp.c6
-rw-r--r--libxrdp/libxrdp.h3
-rw-r--r--libxrdp/libxrdpinc.h3
-rw-r--r--libxrdp/xrdp_orders.c33
4 files changed, 36 insertions, 9 deletions
diff --git a/libxrdp/libxrdp.c b/libxrdp/libxrdp.c
index 9e206c2c..4985bbe2 100644
--- a/libxrdp/libxrdp.c
+++ b/libxrdp/libxrdp.c
@@ -758,10 +758,12 @@ libxrdp_orders_send_brush(struct xrdp_session* session,
/*****************************************************************************/
int EXPORT_CC
libxrdp_orders_send_create_os_surface(struct xrdp_session* session, int id,
- int width, int height)
+ int width, int height, int num_del_list,
+ int* del_list)
{
return xrdp_orders_send_create_os_surface
- ((struct xrdp_orders*)(session->orders), id, width, height);
+ ((struct xrdp_orders*)(session->orders), id, width, height,
+ num_del_list, del_list);
}
/*****************************************************************************/
diff --git a/libxrdp/libxrdp.h b/libxrdp/libxrdp.h
index 35a38190..99649a41 100644
--- a/libxrdp/libxrdp.h
+++ b/libxrdp/libxrdp.h
@@ -389,7 +389,8 @@ xrdp_orders_send_brush(struct xrdp_orders* self, int width, int height,
int bpp, int type, int size, char* data, int cache_id);
int APP_CC
xrdp_orders_send_create_os_surface(struct xrdp_orders* self, int id,
- int width, int height);
+ int width, int height, int num_del_list,
+ int* del_list);
int APP_CC
xrdp_orders_send_switch_os_surface(struct xrdp_orders* self, int id);
diff --git a/libxrdp/libxrdpinc.h b/libxrdp/libxrdpinc.h
index b7974b35..648eb1f6 100644
--- a/libxrdp/libxrdpinc.h
+++ b/libxrdp/libxrdpinc.h
@@ -178,7 +178,8 @@ libxrdp_orders_send_brush(struct xrdp_session* session,
int size, char* data, int cache_id);
int EXPORT_CC
libxrdp_orders_send_create_os_surface(struct xrdp_session* session, int id,
- int width, int height);
+ int width, int height, int num_del_list,
+ int* del_list);
int EXPORT_CC
libxrdp_orders_send_switch_os_surface(struct xrdp_session* session, int id);
diff --git a/libxrdp/xrdp_orders.c b/libxrdp/xrdp_orders.c
index 5acd42b0..4a36e112 100644
--- a/libxrdp/xrdp_orders.c
+++ b/libxrdp/xrdp_orders.c
@@ -1971,21 +1971,45 @@ xrdp_orders_send_brush(struct xrdp_orders* self, int width, int height,
/* send an off screen bitmap entry */
int APP_CC
xrdp_orders_send_create_os_surface(struct xrdp_orders* self, int id,
- int width, int height)
+ int width, int height, int num_del_list,
+ int* del_list)
{
int order_flags;
int cache_id;
+ int flags;
+ int index;
+ int bytes;
- //g_writeln("xrdp_orders_send_create_os_surface:");
- xrdp_orders_check(self, 7);
+ bytes = 7;
+ if (num_del_list > 0)
+ {
+ bytes += 2;
+ bytes += num_del_list * 2;
+ }
+ xrdp_orders_check(self, bytes);
self->order_count++;
order_flags = RDP_ORDER_SECONDARY;
order_flags |= 1 << 2; /* type RDP_ORDER_ALTSEC_CREATE_OFFSCR_BITMAP */
out_uint8(self->out_s, order_flags);
cache_id = id & 0x7fff;
- out_uint16_le(self->out_s, cache_id);
+ flags = cache_id;
+ if (num_del_list > 0)
+ {
+ flags |= 0x8000;
+ }
+ out_uint16_le(self->out_s, flags);
out_uint16_le(self->out_s, width);
out_uint16_le(self->out_s, height);
+ if (num_del_list > 0)
+ {
+ /* delete list */
+ out_uint16_le(self->out_s, num_del_list);
+ for (index = 0; index < num_del_list; index++)
+ {
+ cache_id = del_list[index] & 0x7fff;
+ out_uint16_le(self->out_s, cache_id);
+ }
+ }
return 0;
}
@@ -1997,7 +2021,6 @@ xrdp_orders_send_switch_os_surface(struct xrdp_orders* self, int id)
int order_flags;
int cache_id;
- //g_writeln("xrdp_orders_send_switch_os_surface:");
xrdp_orders_check(self, 3);
self->order_count++;
order_flags = RDP_ORDER_SECONDARY;