mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
xfreerdp: fix building with Xi
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user