This commit is contained in:
sefler 2022-11-14 20:57:01 +08:00
parent e97a66593b
commit 94447752f2
1 changed files with 8 additions and 5 deletions

View File

@ -29,7 +29,10 @@
#include "log.h"
#include "string_calls.h"
/* Code values used in 'code=' settings */
#define XVNC_SESSION_CODE 0
#define XRDP_SESSION_CODE 10
#define XORG_SESSION_CODE 20
/*****************************************************************************/
struct xrdp_wm *
@ -1815,7 +1818,7 @@ xrdp_wm_process_input_mouse(struct xrdp_wm *self, int device_flags,
delta = (device_flags & WheelRotationMask) | ~WheelRotationMask;
// XVNC session has not implemented the touch event for now
if (delta != 0 && self->mm->code != 0)
if (delta != 0 && self->mm->code != XVNC_SESSION_CODE)
{
// Use nature scrolling, up direction is negative.
xrdp_wm_mouse_touch(self, TOUCH_TWO_FINGERS_UP, delta);
@ -1830,7 +1833,7 @@ xrdp_wm_process_input_mouse(struct xrdp_wm *self, int device_flags,
delta = device_flags & WheelRotationMask;
// XVNC session has not implemented the touch event for now
if (delta != 0 && self->mm->code != 0)
if (delta != 0 && self->mm->code != XVNC_SESSION_CODE)
{
xrdp_wm_mouse_touch(self, TOUCH_TWO_FINGERS_DOWN, delta);
}
@ -1865,7 +1868,7 @@ xrdp_wm_process_input_mouse(struct xrdp_wm *self, int device_flags,
delta = (device_flags & WheelRotationMask) | ~WheelRotationMask;
// XVNC session has not implemented the touch event for now
if (delta != 0 && self->mm->code != 0)
if (delta != 0 && self->mm->code != XVNC_SESSION_CODE)
{
// Use nature scrolling, right direction is negative.
xrdp_wm_mouse_touch(self, TOUCH_TWO_FINGERS_RIGHT, delta);
@ -1880,7 +1883,7 @@ xrdp_wm_process_input_mouse(struct xrdp_wm *self, int device_flags,
delta = device_flags & WheelRotationMask;
// XVNC session has not implemented the touch event for now
if (delta != 0 && self->mm->code != 0)
if (delta != 0 && self->mm->code != XVNC_SESSION_CODE)
{
xrdp_wm_mouse_touch(self, TOUCH_TWO_FINGERS_LEFT, delta);
}