diff options
author | jsorg71 <jay.sorg@gmail.com> | 2013-11-05 11:50:11 -0800 |
---|---|---|
committer | jsorg71 <jay.sorg@gmail.com> | 2013-11-05 11:50:11 -0800 |
commit | 1c1de464263395ad40955242949863cc2ad396fb (patch) | |
tree | 9bd9c95bec3dfcaa938624104fc886ab0cd4cf4d | |
parent | 8785f235c2eb830930190a85116ef76c921f44d1 (diff) | |
parent | 4bce6f78c098bf98e0dcd33753b844daa8803e1e (diff) | |
download | xrdp-proprietary-1c1de464263395ad40955242949863cc2ad396fb.tar.gz xrdp-proprietary-1c1de464263395ad40955242949863cc2ad396fb.zip |
Merge pull request #8 from speidy/master
Changes for multimon
-rw-r--r-- | common/xrdp_client_info.h | 1 | ||||
-rw-r--r-- | libxrdp/xrdp_sec.c | 18 | ||||
-rw-r--r-- | xorg/X11R7.6/rdp/rdpup.c | 13 |
3 files changed, 24 insertions, 8 deletions
diff --git a/common/xrdp_client_info.h b/common/xrdp_client_info.h index a257f907..acd145e6 100644 --- a/common/xrdp_client_info.h +++ b/common/xrdp_client_info.h @@ -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 */ }; diff --git a/libxrdp/xrdp_sec.c b/libxrdp/xrdp_sec.c index dd0e2cd6..f52a080d 100644 --- a/libxrdp/xrdp_sec.c +++ b/libxrdp/xrdp_sec.c @@ -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; } diff --git a/xorg/X11R7.6/rdp/rdpup.c b/xorg/X11R7.6/rdp/rdpup.c index 4e9b9659..52472121 100644 --- a/xorg/X11R7.6/rdp/rdpup.c +++ b/xorg/X11R7.6/rdp/rdpup.c @@ -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) { |