VirtualBox

Ignore:
Timestamp:
Feb 3, 2011 3:56:03 PM (14 years ago)
Author:
vboxsync
Message:

Additions/x11: build the X.Org drivers for the current X.Org Server 1.10 beta snapshot

Location:
trunk/src/VBox/Additions/x11/vboxmouse
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/vboxmouse/Makefile.kmk

    r35398 r35840  
    215215
    216216
     217#
     218# vboxmouse_drv_110
     219#
     220DLLS += vboxmouse_drv_110
     221vboxmouse_drv_110_TEMPLATE = VBOXGUESTR3XORGMOD
     222vboxmouse_drv_110_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
     223## @todo replace $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.0-local
     224vboxmouse_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)
     233vboxmouse_drv_110_SOURCES = \
     234        vboxmouse_15.c
     235
     236
    217237# Check the undefined symbols in the X.Org modules against lists of allowed
    218238# symbols.  Not very elegant, but it will catch problems early.
     
    306326        $(QUIET)$(APPEND) -t "$@" "done"
    307327
     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
    308336    endif # ! VBOX_ONLY_SDK
    309337   endif # eq ($(KBUILD_HOST_ARCH),$(KBUILD_TARGET_ARCH))
  • trunk/src/VBox/Additions/x11/vboxmouse/vboxmouse_15.c

    r34754 r35840  
    133133# endif
    134134                               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                               );
    136140
    137141    xf86InitValuatorAxisStruct(device, 1,
     
    140144# endif
    141145                               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                               );
    143151#endif
    144152    xf86InitValuatorDefaults(device, 0);
     
    215223        xf86Msg(X_ERROR, "%s: Failed to open the VirtualBox device (error %d)\n",
    216224                pInfo->name, rc);
    217         return !Success;
     225        return BadMatch;
    218226    }
    219227
     
    233241}
    234242
    235 static InputInfoPtr
    236 VBoxPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
    237 {
    238     InputInfoPtr pInfo;
     243static int
     244VBoxPreInitInfo(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
     245{
    239246    const char *device;
    240 
    241     if (!(pInfo = xf86AllocateInput(drv, 0)))
    242         return NULL;
     247    int rc;
    243248
    244249    /* Initialise the InputInfoRec. */
    245     pInfo->name = dev->identifier;
    246250    pInfo->device_control = VBoxProc;
    247251    pInfo->read_input = VBoxReadInput;
    248     pInfo->conf_idev = dev;
    249252    /* Unlike evdev, we set this unconditionally, as we don't handle keyboards. */
    250253    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",
    259257                                "/dev/vboxguest");
    260258
     
    267265    if (pInfo->fd < 0) {
    268266        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
     278static InputInfoPtr
     279VBoxPreInit(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) {
    269297        xf86DeleteInput(pInfo, 0);
    270298        return NULL;
    271299    }
    272300
    273     if (VBoxProbe(pInfo) != Success) {
    274         xf86DeleteInput(pInfo, 0);
    275         return NULL;
    276     }
    277 
    278301    pInfo->flags |= XI86_CONFIGURED;
    279302    return pInfo;
    280303}
     304#endif
    281305
    282306_X_EXPORT InputDriverRec VBOXMOUSE = {
     
    284308    "vboxmouse",
    285309    NULL,
     310#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
    286311    VBoxPreInit,
     312#else
     313    VBoxPreInitInfo,
     314#endif
    287315    NULL,
    288316    NULL,
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette