From 84f285401ab32bad1ca58f61382e06e9678fe365 Mon Sep 17 00:00:00 2001 From: C-o-r-E Date: Sun, 5 May 2013 18:20:44 -0400 Subject: [PATCH] xfreerdp-client: integrated changes from awakecoding --- client/X11/xf_input.h | 1 + client/X11/xf_window.c | 67 ------------------------------------------ client/X11/xfreerdp.h | 8 +++++ 3 files changed, 9 insertions(+), 67 deletions(-) diff --git a/client/X11/xf_input.h b/client/X11/xf_input.h index 0a571e698..d79bed94d 100644 --- a/client/X11/xf_input.h +++ b/client/X11/xf_input.h @@ -21,6 +21,7 @@ #define __XF_INPUT_H #include "xf_interface.h" +#include "xfreerdp.h" #ifdef WITH_XI #include diff --git a/client/X11/xf_window.c b/client/X11/xf_window.c index bb9e1c95b..f5f844964 100644 --- a/client/X11/xf_window.c +++ b/client/X11/xf_window.c @@ -325,73 +325,6 @@ static void xf_SetWindowPID(xfInfo* xfi, xfWindow* window, pid_t pid) 32, PropModeReplace, (unsigned char *)&pid, 1); } -int xf_input_init(xfInfo* xfi, Window window) -{ - int i, j; - int ndevices; - int major = 2; - int minor = 2; - Status xstatus; - XIEventMask evmask; - XIDeviceInfo* info; - int opcode, event, error; - XIGrabModifiers mods = { 1 }; - unsigned char mask[XIMaskLen(XI_LASTEVENT)]; - - if (!XQueryExtension(xfi->display, "XInputExtension", &opcode, &event, &error)) - { - printf("XInput extension not available.\n"); - return -1; - } - - XIQueryVersion(xfi->display, &major, &minor); - - if (major * 1000 + minor < 2002) - { - printf("Server does not support XI 2.2\n"); - return -1; - } - - info = XIQueryDevice(xfi->display, XIAllDevices, &ndevices); - - for (i = 0; i < ndevices; i++) - { - XIDeviceInfo* dev = &info[i]; - - for (j = 0; j < dev->num_classes; j++) - { - XIAnyClassInfo* class = dev->classes[j]; - XITouchClassInfo* t = (XITouchClassInfo*) class; - - if (class->type != XITouchClass) - continue; - - printf("%s %s touch device, supporting %d touches.\n", - dev->name, (t->mode == XIDirectTouch) ? "direct" : "dependent", t->num_touches); - } - } - - evmask.mask = mask; - evmask.mask_len = sizeof(mask); - ZeroMemory(mask, sizeof(mask)); - evmask.deviceid = XIAllDevices; - - XISetMask(mask, XI_TouchBegin); - XISetMask(mask, XI_TouchUpdate); - XISetMask(mask, XI_TouchEnd); - - xstatus = XISelectEvents(xfi->display, window, &evmask, 1); - //XIClearMask(mask, XI_TouchOwnership); - - mods.modifiers = XIAnyModifier; - - //XIGrabTouchBegin(xfi->display, XIAllMasterDevices, window, XINoOwnerEvents, &evmask, 1, &mods); - - XSync(xfi->display, False); - - return -1; -} - xfWindow* xf_CreateDesktopWindow(xfInfo* xfi, char* name, int width, int height, BOOL decorations) { xfWindow* window; diff --git a/client/X11/xfreerdp.h b/client/X11/xfreerdp.h index 9f79c07d3..f6d4d7df5 100644 --- a/client/X11/xfreerdp.h +++ b/client/X11/xfreerdp.h @@ -105,6 +105,14 @@ struct xf_info HANDLE thread; BOOL UseXThreads; + int XInputOpcode; + int orig_width; + int orig_height; + int cur_width; + int cur_height; + + double scale; + HGDI_DC hdc; BYTE* primary_buffer;