Changeset 35840 in vbox for trunk/src/VBox/Additions/x11/vboxmouse
- Timestamp:
- Feb 3, 2011 3:56:03 PM (14 years ago)
- Location:
- trunk/src/VBox/Additions/x11/vboxmouse
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/vboxmouse/Makefile.kmk
r35398 r35840 215 215 216 216 217 # 218 # vboxmouse_drv_110 219 # 220 DLLS += vboxmouse_drv_110 221 vboxmouse_drv_110_TEMPLATE = VBOXGUESTR3XORGMOD 222 vboxmouse_drv_110_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC 223 ## @todo replace $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.0-local 224 vboxmouse_drv_110_INCS := \ 225 $(VBOX_PATH_X11_ROOT)/inputproto-1.9.99.902 \ 226 $(VBOX_PATH_X11_ROOT)/libpciaccess-0.10.8 \ 227 $(VBOX_PATH_X11_ROOT)/pixman-0.16.0 \ 228 $(VBOX_PATH_X11_ROOT)/xextproto-7.1.1 \ 229 $(VBOX_PATH_X11_ROOT)/xorg-server-1.9.99.901+git20110131.be3be758 \ 230 $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.0-local \ 231 $(VBOX_PATH_X11_ROOT)/xproto-7.0.18 \ 232 $(PATH_SUB_CURRENT) 233 vboxmouse_drv_110_SOURCES = \ 234 vboxmouse_15.c 235 236 217 237 # Check the undefined symbols in the X.Org modules against lists of allowed 218 238 # symbols. Not very elegant, but it will catch problems early. … … 306 326 $(QUIET)$(APPEND) -t "$@" "done" 307 327 328 TESTING += $(vboxmouse_drv_110_0_OUTDIR)/tstvboxmouse19.run 329 OTHERS += $(vboxmouse_drv_110_0_OUTDIR)/tstvboxmouse19.run 330 $$(vboxmouse_drv_110_0_OUTDIR)/tstvboxmouse19.run: $$(INSTARGET_vboxmouse_drv_110) 331 $(QUIET)$(call MSG_L1,Checking for unresolved symbols in $<) 332 $(QUIET)/bin/sh $(PATH_ROOT)/src/bldprogs/checkUndefined.sh $(KBUILD_TARGET) \ 333 $(INSTARGET_vboxmouse_drv_110) $(VBOXMOUSE_SRC_PATH)/undefined_15 334 $(QUIET)$(APPEND) -t "$@" "done" 335 308 336 endif # ! VBOX_ONLY_SDK 309 337 endif # eq ($(KBUILD_HOST_ARCH),$(KBUILD_TARGET_ARCH)) -
trunk/src/VBox/Additions/x11/vboxmouse/vboxmouse_15.c
r34754 r35840 133 133 # endif 134 134 0 /* min X */, 65536 /* max X */, 135 10000, 0, 10000); 135 10000, 0, 10000 136 # if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 137 , Absolute 138 # endif 139 ); 136 140 137 141 xf86InitValuatorAxisStruct(device, 1, … … 140 144 # endif 141 145 0 /* min Y */, 65536 /* max Y */, 142 10000, 0, 10000); 146 10000, 0, 10000 147 # if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 148 , Absolute 149 # endif 150 ); 143 151 #endif 144 152 xf86InitValuatorDefaults(device, 0); … … 215 223 xf86Msg(X_ERROR, "%s: Failed to open the VirtualBox device (error %d)\n", 216 224 pInfo->name, rc); 217 return !Success;225 return BadMatch; 218 226 } 219 227 … … 233 241 } 234 242 235 static InputInfoPtr 236 VBoxPreInit(InputDriverPtr drv, IDevPtr dev, int flags) 237 { 238 InputInfoPtr pInfo; 243 static int 244 VBoxPreInitInfo(InputDriverPtr drv, InputInfoPtr pInfo, int flags) 245 { 239 246 const char *device; 240 241 if (!(pInfo = xf86AllocateInput(drv, 0))) 242 return NULL; 247 int rc; 243 248 244 249 /* Initialise the InputInfoRec. */ 245 pInfo->name = dev->identifier;246 250 pInfo->device_control = VBoxProc; 247 251 pInfo->read_input = VBoxReadInput; 248 pInfo->conf_idev = dev;249 252 /* Unlike evdev, we set this unconditionally, as we don't handle keyboards. */ 250 253 pInfo->type_name = XI_MOUSE; 251 pInfo->conversion_proc = VBoxConvert; 252 pInfo->flags = XI86_POINTER_CAPABLE | XI86_SEND_DRAG_EVENTS | 253 XI86_ALWAYS_CORE; 254 255 xf86CollectInputOptions(pInfo, NULL, NULL); 256 xf86ProcessCommonOptions(pInfo, pInfo->options); 257 258 device = xf86CheckStrOption(dev->commonOptions, "Device", 254 pInfo->flags |= XI86_ALWAYS_CORE; 255 256 device = xf86CheckStrOption(pInfo->options, "Device", 259 257 "/dev/vboxguest"); 260 258 … … 267 265 if (pInfo->fd < 0) { 268 266 xf86Msg(X_ERROR, "Unable to open VirtualBox device \"%s\".\n", device); 267 return BadMatch; 268 } 269 270 rc = VBoxProbe(pInfo); 271 if (rc != Success) 272 return rc; 273 274 return Success; 275 } 276 277 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 278 static InputInfoPtr 279 VBoxPreInit(InputDriverPtr drv, IDevPtr dev, int flags) 280 { 281 InputInfoPtr pInfo; 282 const char *device; 283 284 if (!(pInfo = xf86AllocateInput(drv, 0))) 285 return NULL; 286 287 /* Initialise the InputInfoRec. */ 288 pInfo->name = dev->identifier; 289 pInfo->conf_idev = dev; 290 pInfo->conversion_proc = VBoxConvert; 291 pInfo->flags = XI86_POINTER_CAPABLE | XI86_SEND_DRAG_EVENTS; 292 293 xf86CollectInputOptions(pInfo, NULL, NULL); 294 xf86ProcessCommonOptions(pInfo, pInfo->options); 295 296 if (VBoxPreInitInfo(drv, pInfo, flags) != Success) { 269 297 xf86DeleteInput(pInfo, 0); 270 298 return NULL; 271 299 } 272 300 273 if (VBoxProbe(pInfo) != Success) {274 xf86DeleteInput(pInfo, 0);275 return NULL;276 }277 278 301 pInfo->flags |= XI86_CONFIGURED; 279 302 return pInfo; 280 303 } 304 #endif 281 305 282 306 _X_EXPORT InputDriverRec VBOXMOUSE = { … … 284 308 "vboxmouse", 285 309 NULL, 310 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 286 311 VBoxPreInit, 312 #else 313 VBoxPreInitInfo, 314 #endif 287 315 NULL, 288 316 NULL,
Note:
See TracChangeset
for help on using the changeset viewer.