Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/neutrinolabs/xrdp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsefler <sefler@126.com>2022-09-12 10:09:26 +0300
committersefler <sefler@126.com>2022-09-15 18:55:16 +0300
commitc2b465880b6c1b37d7b2d5f76251351da57f5653 (patch)
tree1361ab8941f3389562c65436114daca5982ead07
parentc4d671497933ff5df718430ec35d7074fe458510 (diff)
add some comments and modify gitignore
-rw-r--r--.gitignore1
-rw-r--r--xrdp/xrdp_wm.c23
2 files changed, 22 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index c76e1401..8710e975 100644
--- a/.gitignore
+++ b/.gitignore
@@ -55,3 +55,4 @@ xrdp/xrdp
xrdp/xrdp.ini
xrdp_configure_options.h
xrdpapi/xrdp-xrdpapi-simple
+.vscode/* \ No newline at end of file
diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c
index 828d0a72..bc92536d 100644
--- a/xrdp/xrdp_wm.c
+++ b/xrdp/xrdp_wm.c
@@ -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);
+ }
}
}