diff options
author | norrarvid <norrarvid@gmail.com> | 2012-06-05 15:54:28 +0200 |
---|---|---|
committer | norrarvid <norrarvid@gmail.com> | 2012-06-05 15:54:28 +0200 |
commit | 3f3a4d0b35989304037d7d51c19e82c294fd843c (patch) | |
tree | 4a7f1139a471545f4accf4a709b1acb418ea008d /freerdp1/xrdp-freerdp.c | |
parent | dbd2cbca8e5ad361706b0ac013b62607bae4b5d3 (diff) | |
download | xrdp-proprietary-3f3a4d0b35989304037d7d51c19e82c294fd843c.tar.gz xrdp-proprietary-3f3a4d0b35989304037d7d51c19e82c294fd843c.zip |
Support for invalidate request sent from clients added
Diffstat (limited to 'freerdp1/xrdp-freerdp.c')
-rw-r--r-- | freerdp1/xrdp-freerdp.c | 45 |
1 files changed, 42 insertions, 3 deletions
diff --git a/freerdp1/xrdp-freerdp.c b/freerdp1/xrdp-freerdp.c index bad9d4ad..a309c1c6 100644 --- a/freerdp1/xrdp-freerdp.c +++ b/freerdp1/xrdp-freerdp.c @@ -214,9 +214,48 @@ lxrdp_event(struct mod* mod, int msg, long param1, long param2, case 110: break; case 200: - /* Currently there are no (?) invalidate API in freeRDP that can receive this request*/ - LLOGLN(0, ("Invalidate request sent from client - Ignored")); - break ; + LLOGLN(10, ("Invalidate request sent from client")); + RECTANGLE_16 *rectangle = (RECTANGLE_16 *) g_malloc(sizeof(RECTANGLE_16), 0); + /* The parameters are coded as follows param1 = MAKELONG(y, x), param2 =MAKELONG(h, w) + * #define MAKELONG(lo, hi) ((((hi) & 0xffff) << 16) | ((lo) & 0xffff)) + */ + rectangle->left = (param1 >> 16) & 0xffff; + rectangle->top = param1 & 0xffff; + rectangle->right = (param2 >> 16) & 0xffff + rectangle->left - 1; + rectangle->bottom = param2 & 0xffff + rectangle->top - 1; + if (mod->inst->settings->refresh_rect) + { + if (mod->inst->update != NULL) + { + if (mod->inst->update->RefreshRect != NULL) + { + if (mod->inst->context != NULL) + { + LLOGLN(0, ("update rectangle left: %d top: %d bottom: %d right: %d", + rectangle->left, rectangle->top, rectangle->bottom, rectangle->right)); + mod->inst->update->RefreshRect(mod->inst->context, 1, rectangle); + } + else + { + LLOGLN(0, ("Invalidate request -The context is null")); + } + } + else + { + LLOGLN(0, ("Invalidate request - RefreshRect is Null")); + } + } + else + { + LLOGLN(0, ("Invalidate request -the update pointer is null")); + } + } + else + { + LLOGLN(0, ("Invalidate request - warning - update rectangle is disabled")); + } + g_free(rectangle); + break; case 0x5555: chanid = LOWORD(param1); flags = HIWORD(param1); |