rdp: add mouse input debug

Add extremely verbose mouse input debugging.

Co-authored-by: Steve Pronovost <spronovo@microsoft.com>
Co-authored-by: Brenton DeGeer <brdegeer@microsoft.com>
Signed-off-by: Hideyuki Nagase <hideyukn@microsoft.com>
Signed-off-by: Steve Pronovost <spronovo@microsoft.com>
Signed-off-by: Brenton DeGeer <brdegeer@microsoft.com>
dev
Hideyuki Nagase 3 years ago committed by Derek Foreman
parent 778c0683c0
commit 7f10997d92
  1. 38
      libweston/backend-rdp/rdp.c

@ -945,6 +945,40 @@ xf_peer_post_connect(freerdp_peer *client)
return TRUE;
}
static void
dump_mouseinput(RdpPeerContext *peerContext, UINT16 flags, UINT16 x, UINT16 y, bool is_ex)
{
struct rdp_backend *b = peerContext->rdpBackend;
rdp_debug_verbose(b, "RDP mouse input%s: (%d, %d): flags:%x: ", is_ex ? "_ex" : "", x, y, flags);
if (is_ex) {
if (flags & PTR_XFLAGS_DOWN)
rdp_debug_verbose_continue(b, "DOWN ");
if (flags & PTR_XFLAGS_BUTTON1)
rdp_debug_verbose_continue(b, "XBUTTON1 ");
if (flags & PTR_XFLAGS_BUTTON2)
rdp_debug_verbose_continue(b, "XBUTTON2 ");
} else {
if (flags & PTR_FLAGS_WHEEL)
rdp_debug_verbose_continue(b, "WHEEL ");
if (flags & PTR_FLAGS_WHEEL_NEGATIVE)
rdp_debug_verbose_continue(b, "WHEEL_NEGATIVE ");
if (flags & PTR_FLAGS_HWHEEL)
rdp_debug_verbose_continue(b, "HWHEEL ");
if (flags & PTR_FLAGS_MOVE)
rdp_debug_verbose_continue(b, "MOVE ");
if (flags & PTR_FLAGS_DOWN)
rdp_debug_verbose_continue(b, "DOWN ");
if (flags & PTR_FLAGS_BUTTON1)
rdp_debug_verbose_continue(b, "BUTTON1 ");
if (flags & PTR_FLAGS_BUTTON2)
rdp_debug_verbose_continue(b, "BUTTON2 ");
if (flags & PTR_FLAGS_BUTTON3)
rdp_debug_verbose_continue(b, "BUTTON3 ");
}
rdp_debug_verbose_continue(b, "\n");
}
static BOOL
xf_mouseEvent(rdpInput *input, UINT16 flags, UINT16 x, UINT16 y)
{
@ -954,6 +988,8 @@ xf_mouseEvent(rdpInput *input, UINT16 flags, UINT16 x, UINT16 y)
bool need_frame = false;
struct timespec time;
dump_mouseinput(peerContext, flags, x, y, false);
if (flags & PTR_FLAGS_MOVE) {
output = peerContext->rdpBackend->output;
if (x < output->base.width && y < output->base.height) {
@ -1017,6 +1053,8 @@ xf_extendedMouseEvent(rdpInput *input, UINT16 flags, UINT16 x, UINT16 y)
struct rdp_output *output;
struct timespec time;
dump_mouseinput(peerContext, flags, x, y, true);
output = peerContext->rdpBackend->output;
if (x < output->base.width && y < output->base.height) {
weston_compositor_get_time(&time);

Loading…
Cancel
Save