diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c index d535573e..6f4fe4fb 100644 --- a/xrdp/xrdp_wm.c +++ b/xrdp/xrdp_wm.c @@ -1813,7 +1813,9 @@ xrdp_wm_process_input_mouse(struct xrdp_wm *self, int device_flags, * The negative number is represented by complement. */ delta = (device_flags & WheelRotationMask) | ~WheelRotationMask; - if (delta != 0) + + // XVNC session has not implemented the touch event for now + if (delta != 0 && self->mm->code != 0) { // Use nature scrolling, up direction is negative. xrdp_wm_mouse_touch(self, TOUCH_TWO_FINGERS_UP, delta); @@ -1826,7 +1828,9 @@ xrdp_wm_process_input_mouse(struct xrdp_wm *self, int device_flags, else { delta = device_flags & WheelRotationMask; - if (delta != 0) + + // XVNC session has not implemented the touch event for now + if (delta != 0 && self->mm->code != 0) { xrdp_wm_mouse_touch(self, TOUCH_TWO_FINGERS_DOWN, delta); } @@ -1859,7 +1863,9 @@ xrdp_wm_process_input_mouse(struct xrdp_wm *self, int device_flags, * The negative number is represented by complement. */ delta = (device_flags & WheelRotationMask) | ~WheelRotationMask; - if (delta != 0) + + // XVNC session has not implemented the touch event for now + if (delta != 0 && self->mm->code != 0) { // Use nature scrolling, right direction is negative. xrdp_wm_mouse_touch(self, TOUCH_TWO_FINGERS_RIGHT, delta); @@ -1872,7 +1878,9 @@ xrdp_wm_process_input_mouse(struct xrdp_wm *self, int device_flags, else { delta = device_flags & WheelRotationMask; - if (delta != 0) + + // XVNC session has not implemented the touch event for now + if (delta != 0 && self->mm->code != 0) { xrdp_wm_mouse_touch(self, TOUCH_TWO_FINGERS_LEFT, delta); }