mirror of https://github.com/neutrinolabs/xrdp
use enum
This commit is contained in:
parent
e97a66593b
commit
94447752f2
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue