Constify extended mouse events

master
Koichiro IWAO 7 years ago committed by metalefty
parent 27aef96e81
commit 2475893402

@ -201,6 +201,11 @@
#define PTRFLAGS_BUTTON2 0x2000
#define PTRFLAGS_BUTTON3 0x4000
/* Mouse Event (MS-RDPBCGR 2.2.8.1.1.3.1.1.4) */
#define PTRXFLAGS_DOWN 0x8000
#define PTRXFLAGS_BUTTON1 0x0001
#define PTRXFLAGS_BUTTON2 0x0002
/* Raster operation masks */
#define ROP2_S(rop3) (rop3 & 0xf)
#define ROP2_P(rop3) ((rop3 & 0x3) | ((rop3 & 0x30) >> 2))

@ -1722,24 +1722,24 @@ static int
xrdp_wm_process_input_mousex(struct xrdp_wm* self, int device_flags,
int x, int y)
{
if (device_flags & 0x8000) /* PTRXFLAGS_DOWN */
if (device_flags & PTRXFLAGS_DOWN)
{
if (device_flags & 0x0001) /* PTRXFLAGS_BUTTON1 */
if (device_flags & PTRXFLAGS_BUTTON1)
{
xrdp_wm_mouse_click(self, x, y, 6, 1);
}
else if (device_flags & 0x0002) /* PTRXFLAGS_BUTTON2 */
else if (device_flags & PTRXFLAGS_BUTTON2)
{
xrdp_wm_mouse_click(self, x, y, 7, 1);
}
}
else
{
if (device_flags & 0x0001) /* PTRXFLAGS_BUTTON1 */
if (device_flags & PTRXFLAGS_BUTTON1)
{
xrdp_wm_mouse_click(self, x, y, 6, 0);
}
else if (device_flags & 0x0002) /* PTRXFLAGS_BUTTON2 */
else if (device_flags & PTRXFLAGS_BUTTON2)
{
xrdp_wm_mouse_click(self, x, y, 7, 0);
}

Loading…
Cancel
Save