Fixed #4835: BeginPaint callback now optional.
This commit is contained in:
parent
8740219118
commit
54f3a388da
@ -283,11 +283,6 @@ static BOOL xf_desktop_resize(rdpContext* context)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL xf_sw_begin_paint(rdpContext* context)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL xf_sw_end_paint(rdpContext* context)
|
||||
{
|
||||
int i;
|
||||
@ -390,11 +385,6 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static BOOL xf_hw_begin_paint(rdpContext* context)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL xf_hw_end_paint(rdpContext* context)
|
||||
{
|
||||
INT32 x, y;
|
||||
@ -1263,13 +1253,11 @@ static BOOL xf_post_connect(freerdp* instance)
|
||||
|
||||
if (settings->SoftwareGdi)
|
||||
{
|
||||
update->BeginPaint = xf_sw_begin_paint;
|
||||
update->EndPaint = xf_sw_end_paint;
|
||||
update->DesktopResize = xf_sw_desktop_resize;
|
||||
}
|
||||
else
|
||||
{
|
||||
update->BeginPaint = xf_hw_begin_paint;
|
||||
update->EndPaint = xf_hw_end_paint;
|
||||
update->DesktopResize = xf_hw_desktop_resize;
|
||||
}
|
||||
|
@ -565,10 +565,11 @@ static int fastpath_recv_update_data(rdpFastPath* fastpath, wStream* s)
|
||||
else
|
||||
{
|
||||
const size_t totalSize = Stream_GetPosition(fastpath->updateData);
|
||||
|
||||
if (totalSize > transport->settings->MultifragMaxRequestSize)
|
||||
{
|
||||
WLog_ERR(TAG, "Total size (%"PRIuz") exceeds MultifragMaxRequestSize (%"PRIu32")",
|
||||
totalSize, transport->settings->MultifragMaxRequestSize);
|
||||
totalSize, transport->settings->MultifragMaxRequestSize);
|
||||
goto out_fail;
|
||||
}
|
||||
|
||||
@ -581,8 +582,6 @@ static int fastpath_recv_update_data(rdpFastPath* fastpath, wStream* s)
|
||||
}
|
||||
|
||||
fastpath->fragmentation = FASTPATH_FRAGMENT_FIRST;
|
||||
|
||||
|
||||
}
|
||||
else if (fragmentation == FASTPATH_FRAGMENT_NEXT)
|
||||
{
|
||||
@ -605,7 +604,6 @@ static int fastpath_recv_update_data(rdpFastPath* fastpath, wStream* s)
|
||||
}
|
||||
|
||||
fastpath->fragmentation = -1;
|
||||
|
||||
Stream_SealLength(fastpath->updateData);
|
||||
Stream_SetPosition(fastpath->updateData, 0);
|
||||
status = fastpath_recv_update(fastpath, updateCode, fastpath->updateData);
|
||||
@ -621,7 +619,6 @@ static int fastpath_recv_update_data(rdpFastPath* fastpath, wStream* s)
|
||||
|
||||
return status;
|
||||
out_fail:
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -634,7 +631,7 @@ int fastpath_recv_updates(rdpFastPath* fastpath, wStream* s)
|
||||
|
||||
update = fastpath->rdp->update;
|
||||
|
||||
if (!IFCALLRESULT(FALSE, update->BeginPaint, update->context))
|
||||
if (!IFCALLRESULT(TRUE, update->BeginPaint, update->context))
|
||||
return -2;
|
||||
|
||||
while (Stream_GetRemainingLength(s) >= 3)
|
||||
|
@ -130,11 +130,14 @@ static BOOL update_read_bitmap_data(rdpUpdate* update, wStream* s,
|
||||
if (bitmapData->bitmapLength > 0)
|
||||
{
|
||||
bitmapData->bitmapDataStream = malloc(bitmapData->bitmapLength);
|
||||
|
||||
if (!bitmapData->bitmapDataStream)
|
||||
return FALSE;
|
||||
|
||||
memcpy(bitmapData->bitmapDataStream, Stream_Pointer(s), bitmapData->bitmapLength);
|
||||
Stream_Seek(s, bitmapData->bitmapLength);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -633,9 +636,9 @@ BOOL update_recv(rdpUpdate* update, wStream* s)
|
||||
}
|
||||
|
||||
Stream_Read_UINT16(s, updateType); /* updateType (2 bytes) */
|
||||
WLog_Print(update->log, WLOG_TRACE, "%s Update Data PDU", UPDATE_TYPE_STRINGS[updateType]);
|
||||
|
||||
//WLog_DBG(TAG, "%s Update Data PDU", UPDATE_TYPE_STRINGS[updateType]);
|
||||
if (!IFCALLRESULT(FALSE, update->BeginPaint, context))
|
||||
if (!IFCALLRESULT(TRUE, update->BeginPaint, context))
|
||||
return FALSE;
|
||||
|
||||
switch (updateType)
|
||||
|
Loading…
Reference in New Issue
Block a user