add some comments and modify gitignore
This commit is contained in:
parent
c4d6714979
commit
c2b465880b
1
.gitignore
vendored
1
.gitignore
vendored
@ -55,3 +55,4 @@ xrdp/xrdp
|
||||
xrdp/xrdp.ini
|
||||
xrdp_configure_options.h
|
||||
xrdpapi/xrdp-xrdpapi-simple
|
||||
.vscode/*
|
@ -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,15 +1833,33 @@ 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)
|
||||
{
|
||||
// [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
|
||||
{
|
||||
delta = device_flags & WheelRotationMask;
|
||||
if (delta != 0)
|
||||
{
|
||||
xrdp_wm_mouse_touch(self, 1, delta);
|
||||
}
|
||||
else
|
||||
{
|
||||
xrdp_wm_mouse_click(self, 0, 0, 7, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user