Merge pull request #536 from jsorg71/unicode

add unicode support
This commit is contained in:
jsorg71
2016-12-11 17:15:34 -08:00
committed by GitHub
4 changed files with 113 additions and 14 deletions
+2 -8
View File
@@ -872,16 +872,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);
+24 -6
View File
@@ -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;
}
/*****************************************************************************/