VirtualBox

Changeset 25456 in vbox for trunk


Ignore:
Timestamp:
Dec 17, 2009 11:40:11 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
56116
Message:

Additions/x11/vboxmouse: properly support X.Org 1.4 in the newer driver

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

Legend:

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

    r25454 r25456  
    242242$$(PATH_vboxmouse_drv_16)/tstvboxmouse16.run: $$(INSTARGET_vboxmouse_drv_16)
    243243        $(QUIET)/bin/sh $(PATH_ROOT)/src/bldprogs/checkUndefined.sh $(KBUILD_TARGET)  \
    244             $(INSTARGET_vboxmouse_drv_16) $(OUR_PATH_VBOXMOUSE)/undefined_16
     244            $(INSTARGET_vboxmouse_drv_16) $(OUR_PATH_VBOXMOUSE)/undefined_15
    245245        $(QUIET)$(APPEND) -t "$@" "done"
    246246
  • trunk/src/VBox/Additions/x11/vboxmouse/vboxmouse_15.c

    r25079 r25456  
    7474        &&  RT_SUCCESS(VbglR3GetMouseStatus(&fFeatures, &cx, &cy))
    7575        && (fFeatures & VMMDEV_MOUSE_HOST_CAN_ABSOLUTE))
     76#if ABI_XINPUT_VERSION == SET_ABI_VERSION(2, 0)
     77        /* Bug in the 1.4 X server series - conversion_proc was no longer
     78         * called, but the server didn't yet do the conversion itself. */
     79        cx = xf86ScaleAxis(cx, 0, screenInfo.screens[0]->width, 0, 65536);
     80        cy = xf86ScaleAxis(cy, 0, screenInfo.screens[0]->height, 0, 65536);
     81#endif
    7682        /* send absolute movement */
    7783        xf86PostMotionEvent(pInfo->dev, 1, 0, 2, cx, cy);
     
    122128
    123129    /* Tell the server about the range of axis values we report */
     130#if ABI_XINPUT_VERSION <= SET_ABI_VERSION(2, 0)
     131    xf86InitValuatorAxisStruct(device, 0, 0, -1, 1, 0, 1);
     132    xf86InitValuatorAxisStruct(device, 1, 0, -1, 1, 0, 1);
     133#else
    124134    xf86InitValuatorAxisStruct(device, 0,
    125 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
     135# if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
    126136                               axis_labels[0],
    127 #endif
     137# endif
    128138                               0 /* min X */, 65536 /* max X */,
    129139                               10000, 0, 10000);
    130     xf86InitValuatorDefaults(device, 0);
    131140
    132141    xf86InitValuatorAxisStruct(device, 1,
    133 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
     142# if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
    134143                               axis_labels[1],
    135 #endif
     144# endif
    136145                               0 /* min Y */, 65536 /* max Y */,
    137146                               10000, 0, 10000);
     147#endif
     148    xf86InitValuatorDefaults(device, 0);
    138149    xf86InitValuatorDefaults(device, 1);
    139150    xf86MotionHistoryAllocate(pInfo);
     
    214225}
    215226
    216 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 2
    217227static Bool
    218228VBoxConvert(InputInfoPtr pInfo, int first, int num, int v0, int v1, int v2,
     
    226236        return FALSE;
    227237}
    228 #endif
    229238
    230239static InputInfoPtr
     
    244253    /* Unlike evdev, we set this unconditionally, as we don't handle keyboards. */
    245254    pInfo->type_name = XI_MOUSE;
    246 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 2
    247255    pInfo->conversion_proc = VBoxConvert;
    248 #endif
    249256    pInfo->flags = XI86_POINTER_CAPABLE | XI86_SEND_DRAG_EVENTS |
    250257            XI86_ALWAYS_CORE;
Note: See TracChangeset for help on using the changeset viewer.

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