Skip to content

Commit

Permalink
use QueuePointerEvents in rdpMouse.c
Browse files Browse the repository at this point in the history
  • Loading branch information
jsorg71 committed Oct 20, 2024
1 parent 36bbd5e commit 8d1fe99
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions xrdpmouse/rdpMouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,34 @@ l_bound_by(int val, int low, int high)
static void
rdpEnqueueMotion(DeviceIntPtr device, int x, int y)
{
int flags;
ValuatorMask *mask;

LLOGLN(10, ("rdpEnqueueMotion:"));
xf86PostMotionEvent(device, TRUE, 0, 2, x, y);
mask = valuator_mask_new(2);
if (mask != NULL)
{
flags = POINTER_ABSOLUTE | POINTER_SCREEN | POINTER_NORAW;
valuator_mask_set(mask, 0, x);
valuator_mask_set(mask, 1, y);
QueuePointerEvents(device, MotionNotify, 0, flags, mask);
valuator_mask_free(&mask);
}
}

/******************************************************************************/
static void
rdpEnqueueButton(DeviceIntPtr device, int type, int buttons)
{
ValuatorMask *mask;

LLOGLN(10, ("rdpEnqueueButton:"));
xf86PostButtonEvent(device, FALSE, buttons, type == ButtonPress, 0, 0);
mask = valuator_mask_new(0);
if (mask != NULL)
{
QueuePointerEvents(device, type, buttons, 0, mask);
valuator_mask_free(&mask);
}
}

/******************************************************************************/
Expand Down

0 comments on commit 8d1fe99

Please sign in to comment.