summaryrefslogtreecommitdiffstats
path: root/xrdp
diff options
context:
space:
mode:
authorKoichiro IWAO <meta@vmeta.jp>2017-10-27 14:16:18 +0900
committermetalefty <meta@vmeta.jp>2017-11-06 16:18:42 +0900
commit8e7e54e49f7e09e327f448da5501465500e4843f (patch)
tree015cf3f789cf0efa2d6d954eea6842adcb7d012b /xrdp
parent903a2bf83a35a92ffba1a5fc0c4da4a87271b6db (diff)
downloadxrdp-proprietary-8e7e54e49f7e09e327f448da5501465500e4843f.tar.gz
xrdp-proprietary-8e7e54e49f7e09e327f448da5501465500e4843f.zip
xrdp_wm: handle horizontal mouse wheel events
Diffstat (limited to 'xrdp')
-rw-r--r--xrdp/xrdp_wm.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c
index 1f5b4953..8c35c5ef 100644
--- a/xrdp/xrdp_wm.c
+++ b/xrdp/xrdp_wm.c
@@ -1683,6 +1683,7 @@ xrdp_wm_process_input_mouse(struct xrdp_wm *self, int device_flags,
}
}
+ /* vertical mouse wheel */
if (device_flags & 0x200) /* PTRFLAGS_WHEEL */
{
if (device_flags & 0x100) /* PTRFLAGS_WHEEL_NEGATIVE */
@@ -1695,6 +1696,24 @@ xrdp_wm_process_input_mouse(struct xrdp_wm *self, int device_flags,
}
}
+ /* horizontal mouse wheel */
+
+ /**
+ * As mstsc does MOUSE not MOUSEX for horizontal scrolling,
+ * PTRFLAGS_HWHEEL must be handled here.
+ */
+ if (device_flags & 0x400) /* PTRFLAGS_HWHEEL */
+ {
+ if (device_flags & 0x100) /* PTRFLAGS_WHEEL_NEGATIVE */
+ {
+ xrdp_wm_mouse_click(self, 0, 0, 6, 0);
+ }
+ else
+ {
+ xrdp_wm_mouse_click(self, 0, 0, 7, 0);
+ }
+ }
+
return 0;
}