diff options
author | Speidy <speidy@gmail.com> | 2016-12-12 15:51:39 -0800 |
---|---|---|
committer | Speidy <speidy@gmail.com> | 2016-12-12 15:51:39 -0800 |
commit | a0cf6030df8364d4a5ab775a8e91ccfeb0ef4209 (patch) | |
tree | 57864869313a3be01062333613b4b057952b7534 /libxrdp | |
parent | 1ef5c2412c07b108bcf5d2984d576578ffb83ef8 (diff) | |
parent | 5966de4ee2b8cf14a86b36f47b8015fc17f026ea (diff) | |
download | xrdp-proprietary-a0cf6030df8364d4a5ab775a8e91ccfeb0ef4209.tar.gz xrdp-proprietary-a0cf6030df8364d4a5ab775a8e91ccfeb0ef4209.zip |
Merge branch 'devel' of https://github.com/neutrinolabs/xrdp into surface_cmds
Diffstat (limited to 'libxrdp')
-rw-r--r-- | libxrdp/xrdp_caps.c | 12 | ||||
-rw-r--r-- | libxrdp/xrdp_fastpath.c | 30 |
2 files changed, 28 insertions, 14 deletions
diff --git a/libxrdp/xrdp_caps.c b/libxrdp/xrdp_caps.c index 9d3352f2..967fa1c5 100644 --- a/libxrdp/xrdp_caps.c +++ b/libxrdp/xrdp_caps.c @@ -846,6 +846,7 @@ xrdp_caps_send_demand_active(struct xrdp_rdp *self) out_uint8(s, 0x01); /* fAllowDynamicFidelity */ out_uint8(s, 0x01); /* fAllowSubsampling */ out_uint8(s, 0x03); /* colorLossLevel */ +#if defined(XRDP_RFXCODEC) || defined(XRDP_NEUTRINORDP) /* remotefx */ codec_caps_count++; out_uint8a(s, XR_CODEC_GUID_REMOTEFX, 16); @@ -858,6 +859,7 @@ xrdp_caps_send_demand_active(struct xrdp_rdp *self) out_uint8(s, 0); /* codec id, client sets */ out_uint16_le(s, 4); /* codecPropertiesLength */ out_uint32_le(s, 0); /* reserved */ +#endif /* jpeg */ codec_caps_count++; out_uint8a(s, XR_CODEC_GUID_JPEG, 16); @@ -891,16 +893,10 @@ xrdp_caps_send_demand_active(struct xrdp_rdp *self) out_uint16_le(s, RDP_CAPSET_INPUT); /* 13(0xd) */ out_uint16_le(s, RDP_CAPLEN_INPUT); /* 88(0x58) */ - /* INPUT_FLAG_SCANCODES 0x0001 - INPUT_FLAG_MOUSEX 0x0004 - INPUT_FLAG_FASTPATH_INPUT 0x0008 - INPUT_FLAG_FASTPATH_INPUT2 0x0020 */ - flags = 0x0001 | 0x0004; + flags = INPUT_FLAG_SCANCODES | INPUT_FLAG_MOUSEX | INPUT_FLAG_UNICODE; if (self->client_info.use_fast_path & 2) { - /* 0x0008 INPUT_FLAG_FASTPATH_INPUT */ - /* 0x0020 INPUT_FLAG_FASTPATH_INPUT2 */ - flags |= 0x0008 | 0x0020; + flags |= INPUT_FLAG_FASTPATH_INPUT | INPUT_FLAG_FASTPATH_INPUT2; } out_uint16_le(s, flags); out_uint8s(s, 82); diff --git a/libxrdp/xrdp_fastpath.c b/libxrdp/xrdp_fastpath.c index 008c8289..33e9c9d0 100644 --- a/libxrdp/xrdp_fastpath.c +++ b/libxrdp/xrdp_fastpath.c @@ -265,12 +265,30 @@ static int APP_CC xrdp_fastpath_process_EVENT_UNICODE(struct xrdp_fastpath *self, int eventFlags, struct stream *s) { - if (!s_check_rem(s, 2)) - { - return 1; - } - in_uint8s(s, 2); - return 0; + int flags; + int code; + + flags = 0; + if (!s_check_rem(s, 2)) + { + return 1; + } + in_uint16_le(s, code); /* unicode (2 byte) */ + if (eventFlags & FASTPATH_INPUT_KBDFLAGS_RELEASE) + { + flags |= KBD_FLAG_UP; + } + else + { + flags |= KBD_FLAG_DOWN; + } + if (eventFlags & FASTPATH_INPUT_KBDFLAGS_EXTENDED) + { + flags |= KBD_FLAG_EXT; + } + xrdp_fastpath_session_callback(self, RDP_INPUT_UNICODE, + code, 0, flags, 0); + return 0; } /*****************************************************************************/ |