Disabel touch events on XVNC session

This commit is contained in:
sefler
2022-11-14 20:13:50 +08:00
parent a63ce2bacd
commit e97a66593b
+12 -4
View File
@@ -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);
}