summaryrefslogtreecommitdiffstats
path: root/libxrdp/xrdp_fastpath.c
diff options
context:
space:
mode:
authorspeidy <speidy@gmail.com>2016-12-13 15:08:37 -0500
committerspeidy <speidy@gmail.com>2016-12-13 15:08:37 -0500
commit3dc0f2860c19e7c7d43d4c5a709dc13f16ff1f7a (patch)
tree098ba1d99caf1e762fb30f729672138b96669b9b /libxrdp/xrdp_fastpath.c
parent5e39bb1f87d3d01b360f03cc81f65f03dd3d6e87 (diff)
parenta0cf6030df8364d4a5ab775a8e91ccfeb0ef4209 (diff)
downloadxrdp-proprietary-3dc0f2860c19e7c7d43d4c5a709dc13f16ff1f7a.tar.gz
xrdp-proprietary-3dc0f2860c19e7c7d43d4c5a709dc13f16ff1f7a.zip
Merge branch 'surface_cmds' of git://github.com/speidy/xrdp into surface_cmds
Diffstat (limited to 'libxrdp/xrdp_fastpath.c')
-rw-r--r--libxrdp/xrdp_fastpath.c30
1 files changed, 24 insertions, 6 deletions
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;
}
/*****************************************************************************/