Merge pull request #8 from speidy/master

Changes for multimon
ulab-next
jsorg71 11 years ago
commit 1c1de46426

@ -108,6 +108,7 @@ struct xrdp_client_info
int nego_sec_layer; /* 0, 1, 2 = RDP security layer, TLS , Negotiate */
int multimon; /* 0 = deny , 1 = allow */
int monitorCount; /* number of monitors detected (max = 16) */
struct monitor_info minfo[16]; /* client monitor data */
};

@ -540,7 +540,7 @@ xrdp_sec_process_logon_info(struct xrdp_sec *self, struct stream *s)
{
return 1;
}
in_uint32_le(s, tzone); /* len of timetone */
in_uint32_le(s, tzone); /* len of timezone */
in_uint8s(s, 62); /* skip */
in_uint8s(s, 22); /* skip misc. */
in_uint8s(s, 62); /* skip */
@ -990,17 +990,19 @@ xrdp_sec_process_mcs_data_monitors(struct xrdp_sec *self, struct stream *s)
g_writeln("monitorCount= %d", monitorCount); // for debugging only
client_info->monitorCount = monitorCount;
/* Add client_monitor_data to client_info struct, will later pass to X11rdp */
for (index = 0; index < monitorCount; index++)
{
in_uint32_le(s, client_info->minfo->left);
in_uint32_le(s, client_info->minfo->top);
in_uint32_le(s, client_info->minfo->right);
in_uint32_le(s, client_info->minfo->bottom);
in_uint32_le(s, client_info->minfo->is_primary);
in_uint32_le(s, client_info->minfo[index].left);
in_uint32_le(s, client_info->minfo[index].top);
in_uint32_le(s, client_info->minfo[index].right);
in_uint32_le(s, client_info->minfo[index].bottom);
in_uint32_le(s, client_info->minfo[index].is_primary);
g_writeln("got a monitor: left= %d, top= %d, right= %d, bottom= %d, is_primary?= %d", client_info->minfo->left,
client_info->minfo->top, client_info->minfo->right, client_info->minfo->bottom, client_info->minfo->is_primary);
g_writeln("got a monitor: left= %d, top= %d, right= %d, bottom= %d, is_primary?= %d", client_info->minfo[index].left,
client_info->minfo[index].top, client_info->minfo[index].right, client_info->minfo[index].bottom, client_info->minfo[index].is_primary);
}
return 0;
}

@ -149,6 +149,8 @@ static int g_disconnect_scheduled = 0;
static CARD32 g_disconnect_timeout_s = 60; /* 60 seconds */
static CARD32 g_disconnect_time_ms = 0; /* time of disconnect in milliseconds */
static int g_do_multimon = 0; /* multimon - turn on or off */
/******************************************************************************/
static CARD32
rdpDeferredDisconnectCallback(OsTimerPtr timer, CARD32 now, pointer arg)
@ -1103,6 +1105,17 @@ rdpup_process_msg(struct stream *s)
{
LLOGLN(0, (" client can not do new(color) cursor"));
}
if (g_rdpScreen.client_info.monitorCount > 0)
{
LLOGLN(0, (" client can do multimon"));
LLOGLN(0, (" client monitor data, monitorCount= %d", g_rdpScreen.client_info.monitorCount));
g_do_multimon = 1;
}
else
{
LLOGLN(0, (" client can not do multimon"));
g_do_multimon = 0;
}
}
else if (msg_type == 105)
{

Loading…
Cancel
Save