xfreerdp: fix building with Xi

This commit is contained in:
Marc-André Moreau
2013-05-10 17:51:09 -04:00
parent 929b3b3076
commit b4151bff2f
3 changed files with 17 additions and 16 deletions

View File

@@ -203,10 +203,6 @@ void xf_input_detect_pinch(xfInfo* xfi)
}
}
#endif
#ifdef WITH_XI
void xf_input_touch_begin(xfInfo* xfi, XIDeviceEvent* event)
{
int i;
@@ -266,11 +262,8 @@ void xf_input_touch_end(xfInfo* xfi, XIDeviceEvent* event)
}
}
#endif
int xf_input_handle_event_local(xfInfo* xfi, XEvent* event)
{
#ifdef WITH_XI
XGenericEventCookie* cookie = &event->xcookie;
XGetEventData(xfi->display, cookie);
@@ -304,12 +297,10 @@ int xf_input_handle_event_local(xfInfo* xfi, XEvent* event)
}
XFreeEventData(xfi->display,cookie);
#endif
return 0;
}
#ifdef WITH_XI
int xf_input_touch_begin_remote(xfInfo* xfi, XIDeviceEvent* event)
{
return 0;
@@ -325,11 +316,8 @@ int xf_input_touch_end_remote(xfInfo* xfi, XIDeviceEvent* event)
return 0;
}
#endif
int xf_input_handle_event_remote(xfInfo* xfi, XEvent* event)
{
#ifdef WITH_XI
XGenericEventCookie* cookie = &event->xcookie;
XGetEventData(xfi->display, cookie);
@@ -356,10 +344,19 @@ int xf_input_handle_event_remote(xfInfo* xfi, XEvent* event)
}
XFreeEventData(xfi->display,cookie);
#endif
return 0;
}
#else
int xf_input_init(xfInfo* xfi, Window window)
{
return 0;
}
#endif
void xf_process_rdpei_event(xfInfo* xfi, wMessage* event)
{
switch (GetMessageType(event->id))
@@ -377,6 +374,7 @@ void xf_process_rdpei_event(xfInfo* xfi, wMessage* event)
int xf_input_handle_event(xfInfo* xfi, XEvent* event)
{
#ifdef WITH_XI
if (xfi->settings->MultiTouchInput)
{
return xf_input_handle_event_remote(xfi, event);
@@ -384,6 +382,7 @@ int xf_input_handle_event(xfInfo* xfi, XEvent* event)
if (xfi->enableScaling)
return xf_input_handle_event_local(xfi, event);
#endif
return 0;
}

View File

@@ -27,7 +27,8 @@
#include <X11/extensions/XInput2.h>
#endif
int xf_input_init(xfInfo* xfi, Window win);
int xf_input_init(xfInfo* xfi, Window window);
int xf_input_handle_event(xfInfo* xfi, XEvent* event);
void xf_process_rdpei_event(xfInfo* xfi, wMessage* event);

View File

@@ -44,9 +44,10 @@
#ifdef WITH_XI
#include <X11/extensions/XInput2.h>
#include "xf_input.h"
#endif
#include "xf_input.h"
#ifdef WITH_DEBUG_X11
#define DEBUG_X11(fmt, ...) DEBUG_CLASS(X11, fmt, ## __VA_ARGS__)
#else