mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 00:14:11 +09:00
libfreerdp-core: fix orders state reset on deactivate all pdu
This commit is contained in:
@@ -1188,6 +1188,8 @@ struct rdp_update
|
||||
pcSurfaceBits SurfaceBits;
|
||||
pcSurfaceCommand SurfaceCommand;
|
||||
|
||||
void* state_start;
|
||||
|
||||
BITMAP_UPDATE bitmap_update;
|
||||
PALETTE_UPDATE palette_update;
|
||||
PLAY_SOUND_UPDATE play_sound;
|
||||
@@ -1250,6 +1252,8 @@ struct rdp_update
|
||||
MONITORED_DESKTOP_ORDER monitored_desktop;
|
||||
|
||||
SURFACE_BITS_COMMAND surface_bits_command;
|
||||
|
||||
void* state_end;
|
||||
};
|
||||
|
||||
#endif /* __UPDATE_API_H */
|
||||
|
||||
@@ -383,10 +383,7 @@ boolean rdp_client_connect_demand_active(rdpRdp* rdp, STREAM* s)
|
||||
return False;
|
||||
|
||||
rdp->state = CONNECTION_STATE_ACTIVE;
|
||||
|
||||
update_reset_state(rdp->update);
|
||||
rdp->update->switch_surface.bitmapId = SCREEN_BITMAP_SURFACE;
|
||||
IFCALL(rdp->update->SwitchSurface, rdp->update, &(rdp->update->switch_surface));
|
||||
|
||||
return True;
|
||||
}
|
||||
@@ -555,6 +552,7 @@ boolean rdp_server_accept_confirm_active(rdpRdp* rdp, STREAM* s)
|
||||
return True;
|
||||
|
||||
rdp->state = CONNECTION_STATE_ACTIVE;
|
||||
update_reset_state(rdp->update);
|
||||
|
||||
if (!rdp_send_server_synchronize_pdu(rdp))
|
||||
return False;
|
||||
|
||||
@@ -323,13 +323,17 @@ void update_recv(rdpUpdate* update, STREAM* s)
|
||||
|
||||
void update_reset_state(rdpUpdate* update)
|
||||
{
|
||||
memset(&update->order_info, 0, sizeof(ORDER_INFO));
|
||||
update->state_start = &update->state_start;
|
||||
update->state_end = &update->state_end;
|
||||
memset(update->state_start, 0, update->state_end - update->state_start);
|
||||
update->order_info.orderType = ORDER_TYPE_PATBLT;
|
||||
update->switch_surface.bitmapId = SCREEN_BITMAP_SURFACE;
|
||||
IFCALL(update->SwitchSurface, update, &(update->switch_surface));
|
||||
}
|
||||
|
||||
static void update_begin_paint(rdpUpdate* update)
|
||||
{
|
||||
update_reset_state(update);
|
||||
|
||||
}
|
||||
|
||||
static void update_end_paint(rdpUpdate* update)
|
||||
|
||||
Reference in New Issue
Block a user