Implement SetBounds.

This commit is contained in:
Michael Jumper 2012-02-08 14:16:05 -08:00
parent f7928c2574
commit 1bb82d68f8
3 changed files with 29 additions and 0 deletions

View File

@ -46,5 +46,6 @@ void guac_rdp_gdi_scrblt(rdpContext* context, SCRBLT_ORDER* scrblt);
void guac_rdp_gdi_memblt(rdpContext* context, MEMBLT_ORDER* memblt); void guac_rdp_gdi_memblt(rdpContext* context, MEMBLT_ORDER* memblt);
void guac_rdp_gdi_opaquerect(rdpContext* context, OPAQUE_RECT_ORDER* opaque_rect); void guac_rdp_gdi_opaquerect(rdpContext* context, OPAQUE_RECT_ORDER* opaque_rect);
void guac_rdp_gdi_palette_update(rdpContext* context, PALETTE_UPDATE* palette); void guac_rdp_gdi_palette_update(rdpContext* context, PALETTE_UPDATE* palette);
void guac_rdp_gdi_set_bounds(rdpContext* context, rdpBounds* bounds);
#endif #endif

View File

@ -124,6 +124,7 @@ boolean rdp_freerdp_pre_connect(freerdp* instance) {
/* Set up GDI */ /* Set up GDI */
instance->update->Palette = guac_rdp_gdi_palette_update; instance->update->Palette = guac_rdp_gdi_palette_update;
instance->update->SetBounds = guac_rdp_gdi_set_bounds;
primary = instance->update->primary; primary = instance->update->primary;
primary->DstBlt = guac_rdp_gdi_dstblt; primary->DstBlt = guac_rdp_gdi_dstblt;

View File

@ -88,3 +88,30 @@ void guac_rdp_gdi_palette_update(rdpContext* context, PALETTE_UPDATE* palette) {
clrconv->palette->entries = palette->entries; clrconv->palette->entries = palette->entries;
} }
void guac_rdp_gdi_set_bounds(rdpContext* context, rdpBounds* bounds) {
guac_client* client = ((rdp_freerdp_context*) context)->client;
const guac_layer* current_layer = ((rdp_guac_client_data*) client->data)->current_surface;
/* Set clip if specified */
if (bounds != NULL)
guac_protocol_send_clip(
client->socket,
current_layer,
bounds->left,
bounds->top,
bounds->right - bounds->left + 1,
bounds->bottom - bounds->top + 1);
/* Otherwise, reset clip */
else
guac_protocol_send_clip(
client->socket,
current_layer,
0, 0,
context->instance->settings->width,
context->instance->settings->height);
}