add some comments and modify gitignore

This commit is contained in:
sefler 2022-09-12 15:09:26 +08:00
parent c4d6714979
commit c2b465880b
2 changed files with 22 additions and 2 deletions

1
.gitignore vendored
View File

@ -55,3 +55,4 @@ xrdp/xrdp
xrdp/xrdp.ini
xrdp_configure_options.h
xrdpapi/xrdp-xrdpapi-simple
.vscode/*

View File

@ -1800,6 +1800,7 @@ xrdp_wm_process_input_mouse(struct xrdp_wm *self, int device_flags,
int delta = 0;
if (device_flags & PTRFLAGS_WHEEL_NEGATIVE)
{
// [MS-RDPBCGR] In negative scrolling, rotation distance is negative.
delta = (device_flags & WheelRotationMask) | ~WheelRotationMask;
if (delta != 0)
{
@ -1832,13 +1833,31 @@ xrdp_wm_process_input_mouse(struct xrdp_wm *self, int device_flags,
*/
if (device_flags & PTRFLAGS_HWHEEL)
{
int delta = 0;
if (device_flags & PTRFLAGS_WHEEL_NEGATIVE)
{
xrdp_wm_mouse_click(self, 0, 0, 6, 0);
// [MS-RDPBCGR] In negative scrolling, rotation distance is negative.
delta = (device_flags & WheelRotationMask) | ~WheelRotationMask;
if (delta != 0)
{
xrdp_wm_mouse_touch(self, 1, delta);
}
else
{
xrdp_wm_mouse_click(self, 0, 0, 6, 0);
}
}
else
{
xrdp_wm_mouse_click(self, 0, 0, 7, 0);
delta = device_flags & WheelRotationMask;
if (delta != 0)
{
xrdp_wm_mouse_touch(self, 1, delta);
}
else
{
xrdp_wm_mouse_click(self, 0, 0, 7, 0);
}
}
}