Rename suppress output functions to match MS-RDPBCGR

Issue #161
This commit is contained in:
Karl Mikaelsson 2017-10-27 14:58:20 +02:00
parent ba568443e1
commit 8f83c1f6c7
4 changed files with 23 additions and 14 deletions

View File

@ -785,3 +785,10 @@ enum RDP_PDU_REDIRECT_FLAGS
/* [MS-RDPBCGR] 2.2.7.2.7 */ /* [MS-RDPBCGR] 2.2.7.2.7 */
#define LARGE_POINTER_FLAG_96x96 1 #define LARGE_POINTER_FLAG_96x96 1
/* [MS-RDPBCGR] TS_SUPPRESS_OUTPUT_PDU allowDisplayUpdates */
enum RDP_SUPPRESS_STATUS
{
SUPPRESS_DISPLAY_UPDATES = 0x00,
ALLOW_DISPLAY_UPDATES = 0x01
};

View File

@ -150,7 +150,7 @@ void process_ts_fp_updates(STREAM s);
void rdp_in_unistr(STREAM s, int in_len, char **string, uint32 * str_size); void rdp_in_unistr(STREAM s, int in_len, char **string, uint32 * str_size);
void rdp_send_input(uint32 time, uint16 message_type, uint16 device_flags, uint16 param1, void rdp_send_input(uint32 time, uint16 message_type, uint16 device_flags, uint16 param1,
uint16 param2); uint16 param2);
void rdp_send_client_window_status(int status); void rdp_send_suppress_output_pdu(enum RDP_SUPPRESS_STATUS allowupdates);
void process_colour_pointer_pdu(STREAM s); void process_colour_pointer_pdu(STREAM s);
void process_new_pointer_pdu(STREAM s); void process_new_pointer_pdu(STREAM s);
void process_cached_pointer_pdu(STREAM s); void process_cached_pointer_pdu(STREAM s);

24
rdp.c
View File

@ -532,35 +532,37 @@ rdp_send_input(uint32 time, uint16 message_type, uint16 device_flags, uint16 par
rdp_send_data(s, RDP_DATA_PDU_INPUT); rdp_send_data(s, RDP_DATA_PDU_INPUT);
} }
/* Send a client window information PDU */ /* Send a Suppress Output PDU */
void void
rdp_send_client_window_status(int status) rdp_send_suppress_output_pdu(enum RDP_SUPPRESS_STATUS allowupdates)
{ {
STREAM s; STREAM s;
static int current_status = 1; static int current_status = 1;
if (current_status == status) if (current_status == allowupdates)
return; return;
s = rdp_init_data(12); s = rdp_init_data(12);
out_uint32_le(s, status); out_uint8(s, allowupdates); /* allowDisplayUpdates */
out_uint8s(s, 3); /* pad3Octets */
switch (status) switch (allowupdates)
{ {
case 0: /* shut the server up */ case SUPPRESS_DISPLAY_UPDATES: /* shut the server up */
break; break;
case 1: /* receive data again */ case ALLOW_DISPLAY_UPDATES: /* receive data again */
out_uint32_le(s, 0); /* unknown */ out_uint16_le(s, 0); /* left */
out_uint16_le(s, g_width); out_uint16_le(s, 0); /* top */
out_uint16_le(s, g_height); out_uint16_le(s, g_width); /* right */
out_uint16_le(s, g_height); /* bottom */
break; break;
} }
s_mark_end(s); s_mark_end(s);
rdp_send_data(s, RDP_DATA_PDU_CLIENT_WINDOW_STATUS); rdp_send_data(s, RDP_DATA_PDU_CLIENT_WINDOW_STATUS);
current_status = status; current_status = allowupdates;
} }
/* Send persistent bitmap cache enumeration PDU's */ /* Send persistent bitmap cache enumeration PDU's */

4
xwin.c
View File

@ -2670,11 +2670,11 @@ xwin_process_events(void)
break; break;
case MapNotify: case MapNotify:
if (!g_seamless_active) if (!g_seamless_active)
rdp_send_client_window_status(1); rdp_send_suppress_output_pdu(ALLOW_DISPLAY_UPDATES);
break; break;
case UnmapNotify: case UnmapNotify:
if (!g_seamless_active) if (!g_seamless_active)
rdp_send_client_window_status(0); rdp_send_suppress_output_pdu(SUPPRESS_DISPLAY_UPDATES);
break; break;
case ConfigureNotify: case ConfigureNotify:
#ifdef HAVE_XRANDR #ifdef HAVE_XRANDR