Merge pull request #25 from ArvidNorr/invalidate

Support for invalidate request sent from clients added
This commit is contained in:
jsorg71 2012-06-06 11:21:10 -07:00
commit 3fad514c02
2 changed files with 43 additions and 4 deletions

View File

@ -214,9 +214,48 @@ lxrdp_event(struct mod* mod, int msg, long param1, long param2,
case 110: case 110:
break; break;
case 200: case 200:
/* Currently there are no (?) invalidate API in freeRDP that can receive this request*/ LLOGLN(10, ("Invalidate request sent from client"));
LLOGLN(0, ("Invalidate request sent from client - Ignored")); RECTANGLE_16 *rectangle = (RECTANGLE_16 *) g_malloc(sizeof(RECTANGLE_16), 0);
break ; /* 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: case 0x5555:
chanid = LOWORD(param1); chanid = LOWORD(param1);
flags = HIWORD(param1); flags = HIWORD(param1);

View File

@ -142,7 +142,7 @@ int main(int argc, char** argv)
g_tcp_close(sock); g_tcp_close(sock);
scp_session_destroy(s); scp_session_destroy(s);
scp_connection_destroy(c); scp_connection_destroy(c);
log_end(&logging); log_end();
return 0; return 0;
} }