diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2016-12-10 00:11:28 -0800 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2016-12-10 00:11:28 -0800 |
commit | 2f8d3ba9da68c120a5a4f156a0da06c135b9e862 (patch) | |
tree | 1b22111188894eaa0526fe54d0ec463ef27df4e8 /libxrdp | |
parent | 42272c0f1891264af718e8f0a02ebc883f248ed8 (diff) | |
download | xrdp-proprietary-2f8d3ba9da68c120a5a4f156a0da06c135b9e862.tar.gz xrdp-proprietary-2f8d3ba9da68c120a5a4f156a0da06c135b9e862.zip |
add unicode support
Diffstat (limited to 'libxrdp')
-rw-r--r-- | libxrdp/xrdp_caps.c | 3 | ||||
-rw-r--r-- | libxrdp/xrdp_fastpath.c | 30 |
2 files changed, 26 insertions, 7 deletions
diff --git a/libxrdp/xrdp_caps.c b/libxrdp/xrdp_caps.c index 8d5250d5..bb1cd619 100644 --- a/libxrdp/xrdp_caps.c +++ b/libxrdp/xrdp_caps.c @@ -872,9 +872,10 @@ xrdp_caps_send_demand_active(struct xrdp_rdp *self) /* INPUT_FLAG_SCANCODES 0x0001 INPUT_FLAG_MOUSEX 0x0004 + INPUT_FLAG_UNICODE 0x0010 INPUT_FLAG_FASTPATH_INPUT 0x0008 INPUT_FLAG_FASTPATH_INPUT2 0x0020 */ - flags = 0x0001 | 0x0004; + flags = 0x0001 | 0x0004 | 0x0010; if (self->client_info.use_fast_path & 2) { /* 0x0008 INPUT_FLAG_FASTPATH_INPUT */ diff --git a/libxrdp/xrdp_fastpath.c b/libxrdp/xrdp_fastpath.c index 008c8289..daa08373 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); /* keyCode (1 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; } /*****************************************************************************/ |