Merge pull request #1667 from bmiklautz/stable-1.0_issue_1654
Stable 1.0 issue 1654
This commit is contained in:
commit
5af8de7204
@ -29,6 +29,8 @@
|
||||
|
||||
#include "xf_event.h"
|
||||
|
||||
#define CLAMP_ZERO(val) val < 0 ? 0 : val
|
||||
|
||||
static const char* const X11_EVENT_STRINGS[] =
|
||||
{
|
||||
"", "",
|
||||
@ -68,11 +70,6 @@ static const char* const X11_EVENT_STRINGS[] =
|
||||
"GenericEvent",
|
||||
};
|
||||
|
||||
void xf_send_mouse_motion_event(rdpInput* input, boolean down, uint32 button, uint16 x, uint16 y)
|
||||
{
|
||||
input->MouseEvent(input, PTR_FLAGS_MOVE, x, y);
|
||||
}
|
||||
|
||||
boolean xf_event_Expose(xfInfo* xfi, XEvent* event, boolean app)
|
||||
{
|
||||
int x, y;
|
||||
@ -125,7 +122,7 @@ boolean xf_event_MotionNotify(xfInfo* xfi, XEvent* event, boolean app)
|
||||
return true;
|
||||
}
|
||||
|
||||
input->MouseEvent(input, PTR_FLAGS_MOVE, event->xmotion.x, event->xmotion.y);
|
||||
input->MouseEvent(input, PTR_FLAGS_MOVE, CLAMP_ZERO(event->xmotion.x), CLAMP_ZERO(event->xmotion.y));
|
||||
|
||||
if (xfi->fullscreen)
|
||||
XSetInputFocus(xfi->display, xfi->window->handle, RevertToPointerRoot, CurrentTime);
|
||||
@ -143,7 +140,7 @@ boolean xf_event_MotionNotify(xfInfo* xfi, XEvent* event, boolean app)
|
||||
{
|
||||
x += window->windowOffsetX;
|
||||
y += window->windowOffsetY;
|
||||
input->MouseEvent(input, PTR_FLAGS_MOVE, x, y);
|
||||
input->MouseEvent(input, PTR_FLAGS_MOVE, CLAMP_ZERO(x), CLAMP_ZERO(y));
|
||||
}
|
||||
}
|
||||
|
||||
@ -223,7 +220,7 @@ boolean xf_event_ButtonPress(xfInfo* xfi, XEvent* event, boolean app)
|
||||
}
|
||||
}
|
||||
|
||||
input->MouseEvent(input, flags, x, y);
|
||||
input->MouseEvent(input, flags, CLAMP_ZERO(x), CLAMP_ZERO(y));
|
||||
}
|
||||
}
|
||||
|
||||
@ -283,7 +280,7 @@ boolean xf_event_ButtonRelease(xfInfo* xfi, XEvent* event, boolean app)
|
||||
}
|
||||
}
|
||||
|
||||
input->MouseEvent(input, flags, x, y);
|
||||
input->MouseEvent(input, flags, CLAMP_ZERO(x), CLAMP_ZERO(y));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user