Changeset 25079 in vbox for trunk/src/VBox/Additions/x11/vboxmouse
- Timestamp:
- Nov 28, 2009 11:31:19 PM (15 years ago)
- Location:
- trunk/src/VBox/Additions/x11/vboxmouse
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/vboxmouse/undefined_15
r22694 r25079 87 87 __moddi3 88 88 InitPtrFeedbackClassDeviceStruct 89 xf86ScaleAxis 90 miPointerGetMotionEvents 91 miPointerGetMotionBufferSize 92 miPointerCurrentScreen 93 screenInfo -
trunk/src/VBox/Additions/x11/vboxmouse/vboxmouse_15.c
r23039 r25079 53 53 #include <xf86.h> 54 54 #include <xf86Xinput.h> 55 #include <exevents.h>56 55 #include <mipointer.h> 57 56 … … 67 66 68 67 /* The first test here is a workaround for an apparent bug in Xorg Server 1.5 */ 69 if ( miPointerGetScreen(pInfo->dev) != NULL 70 && RT_SUCCESS(VbglR3GetMouseStatus(&fFeatures, &cx, &cy)) 68 if ( 69 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 2 70 miPointerCurrentScreen() != NULL 71 #else 72 miPointerGetScreen(pInfo->dev) != NULL 73 #endif 74 && RT_SUCCESS(VbglR3GetMouseStatus(&fFeatures, &cx, &cy)) 71 75 && (fFeatures & VMMDEV_MOUSE_HOST_CAN_ABSOLUTE)) 72 76 /* send absolute movement */ … … 90 94 pInfo = device->public.devicePrivate; 91 95 if (!InitValuatorClassDeviceStruct(device, 2, 92 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3 96 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 2 97 miPointerGetMotionEvents, 98 miPointerGetMotionBufferSize(), 99 #elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3 93 100 GetMotionHistory, 101 GetMotionHistorySize(), 102 #elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 7 103 GetMotionHistorySize(), 94 104 #elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 95 105 axis_labels, 96 #endif 97 GetMotionHistorySize(), Absolute)) 106 GetMotionHistorySize(), 107 #else 108 # error Unsupported version of X.Org 109 #endif 110 Absolute)) 98 111 return !Success; 99 112 … … 146 159 return xrc; 147 160 } 148 xf86Msg(X_CONFIG, "%s: Mouse Integration associated with screen %d\n",149 pInfo->name,150 xf86SetIntOption(pInfo->options, "ScreenNumber", 0));151 161 break; 152 162 … … 204 214 } 205 215 216 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 2 217 static Bool 218 VBoxConvert(InputInfoPtr pInfo, int first, int num, int v0, int v1, int v2, 219 int v3, int v4, int v5, int *x, int *y) 220 { 221 if (first == 0) { 222 *x = xf86ScaleAxis(v0, 0, screenInfo.screens[0]->width, 0, 65536); 223 *y = xf86ScaleAxis(v1, 0, screenInfo.screens[0]->height, 0, 65536); 224 return TRUE; 225 } else 226 return FALSE; 227 } 228 #endif 229 206 230 static InputInfoPtr 207 231 VBoxPreInit(InputDriverPtr drv, IDevPtr dev, int flags) … … 220 244 /* Unlike evdev, we set this unconditionally, as we don't handle keyboards. */ 221 245 pInfo->type_name = XI_MOUSE; 246 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 2 247 pInfo->conversion_proc = VBoxConvert; 248 #endif 222 249 pInfo->flags = XI86_POINTER_CAPABLE | XI86_SEND_DRAG_EVENTS | 223 250 XI86_ALWAYS_CORE;
Note:
See TracChangeset
for help on using the changeset viewer.