mirror of
https://github.com/X11Libre/xf86-input-vmmouse.git
synced 2026-04-03 22:32:25 +00:00
bump minimal xorg version to 1.18
1.18 was released a decade ago, so it seems reasonable stop supporting older ones. We can also get rid of some ifdef wood this ways. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
5944f008f0
commit
02cd226c07
21
configure.ac
21
configure.ac
@@ -185,26 +185,7 @@ if test x$use_x86_64_iopl = xyes; then
|
||||
[AC_MSG_ERROR([cannot find library for x86_64_iopl])])
|
||||
fi
|
||||
|
||||
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.1] xproto $REQUIRED_MODULES)
|
||||
|
||||
PKG_CHECK_EXISTS([xorg-server >= 1.1.0],
|
||||
[AC_DEFINE([HAVE_XORG_SERVER_1_1_0], 1,
|
||||
[Has version 1.1.0 or greater of the Xserver])])
|
||||
|
||||
PKG_CHECK_EXISTS([xorg-server > 1.4.99],
|
||||
[AC_DEFINE([HAVE_XORG_SERVER_1_5_0], 1,
|
||||
[Has version 1.5.0 or greater of the Xserver])])
|
||||
|
||||
PKG_CHECK_EXISTS([xorg-server >= 1.3.99.0 xorg-server <= 1.4.0.90],
|
||||
[AC_DEFINE([CALL_CONVERSION_PROC], 1,
|
||||
[Call conversion_proc from within the driver, as
|
||||
Xserver doesn't])])
|
||||
PKG_CHECK_EXISTS([xorg-server > 1.4.0.90],
|
||||
[AC_DEFINE([ABS_VALUATOR_AXES], 1,
|
||||
[Define absolute valuator axes])])
|
||||
PKG_CHECK_EXISTS([xorg-server >= 1.6.0],
|
||||
[AC_DEFINE([NO_MOUSE_MODULE], 1,
|
||||
[Do not include built-in mouse module fallback])])
|
||||
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.18] xproto $REQUIRED_MODULES)
|
||||
|
||||
# Checks for libraries.
|
||||
|
||||
|
||||
@@ -37,12 +37,7 @@
|
||||
#define _VMMOUSE_PROTO_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef HAVE_XORG_SERVER_1_1_0
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include "xf86_libc.h"
|
||||
#endif
|
||||
|
||||
/* Map Solaris/Sun compiler #defines to gcc equivalents */
|
||||
#if !defined __i386__ && defined __i386
|
||||
|
||||
@@ -80,11 +80,6 @@
|
||||
#include "xisb.h"
|
||||
#include "mipointer.h"
|
||||
|
||||
#ifndef HAVE_XORG_SERVER_1_5_0
|
||||
#include <xf86_ansic.h>
|
||||
#include <xf86_libc.h>
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* Local Headers
|
||||
****************************************************************************/
|
||||
@@ -329,19 +324,6 @@ VMMousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
|
||||
{
|
||||
InputInfoPtr pInfo;
|
||||
|
||||
#ifndef NO_MOUSE_MODULE
|
||||
{
|
||||
OSMouseInfoPtr osInfo = NULL;
|
||||
|
||||
/*
|
||||
* let Xserver init the mouse first
|
||||
*/
|
||||
osInfo = xf86OSMouseInit(0);
|
||||
if (!osInfo)
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* enable hardware access
|
||||
*/
|
||||
@@ -576,14 +558,6 @@ VMMouseDoPostEvent(InputInfoPtr pInfo, int buttons, int dx, int dy)
|
||||
(mPriv->vmmousePrevInput.Flags & VMMOUSE_MOVE_RELATIVE);
|
||||
}
|
||||
if (mouseMoved) {
|
||||
|
||||
#ifdef CALL_CONVERSION_PROC
|
||||
/*
|
||||
* Xservers between 1.3.99.0 - 1.4.0.90 do not call conversion_proc, so
|
||||
* we need to do the conversion from device to screen space.
|
||||
*/
|
||||
VMMouseConvertProc(pInfo, 0, 2, dx, dy, 0, 0, 0, 0, &dx, &dy);
|
||||
#endif
|
||||
xf86PostMotionEvent(pInfo->dev, !mPriv->isCurrRelative, 0, 2, dx, dy);
|
||||
}
|
||||
|
||||
@@ -873,13 +847,8 @@ VMMouseDeviceControl(DeviceIntPtr device, int mode)
|
||||
btn_labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT);
|
||||
/* other buttons are unknown */
|
||||
|
||||
#ifdef ABS_VALUATOR_AXES
|
||||
axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X);
|
||||
axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y);
|
||||
#else
|
||||
axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X);
|
||||
axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y);
|
||||
#endif /* ABS_VALUATOR_AXES */
|
||||
#endif
|
||||
|
||||
InitPointerDeviceStruct((DevicePtr)device, map,
|
||||
@@ -904,7 +873,6 @@ VMMouseDeviceControl(DeviceIntPtr device, int mode)
|
||||
);
|
||||
|
||||
/* X valuator */
|
||||
#ifdef ABS_VALUATOR_AXES
|
||||
xf86InitValuatorAxisStruct(device, 0,
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
|
||||
axes_labels[0],
|
||||
@@ -914,20 +882,8 @@ VMMouseDeviceControl(DeviceIntPtr device, int mode)
|
||||
, Absolute
|
||||
#endif
|
||||
);
|
||||
#else
|
||||
xf86InitValuatorAxisStruct(device, 0,
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
|
||||
axes_labels[0],
|
||||
#endif
|
||||
0, -1, 1, 0, 1
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
|
||||
, Relative
|
||||
#endif
|
||||
);
|
||||
#endif
|
||||
xf86InitValuatorDefaults(device, 0);
|
||||
/* Y valuator */
|
||||
#ifdef ABS_VALUATOR_AXES
|
||||
xf86InitValuatorAxisStruct(device, 1,
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
|
||||
axes_labels[1],
|
||||
@@ -937,17 +893,6 @@ VMMouseDeviceControl(DeviceIntPtr device, int mode)
|
||||
, Absolute
|
||||
#endif
|
||||
);
|
||||
#else
|
||||
xf86InitValuatorAxisStruct(device, 1,
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
|
||||
axes_labels[1],
|
||||
#endif
|
||||
0, -1, 1, 0, 1
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
|
||||
, Relative
|
||||
#endif
|
||||
);
|
||||
#endif
|
||||
xf86InitValuatorDefaults(device, 1);
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
|
||||
xf86MotionHistoryAllocate(pInfo);
|
||||
@@ -1346,27 +1291,6 @@ VMMousePlug(pointer module,
|
||||
xf86Msg(X_INFO, "VMWARE(0): VMMOUSE module was loaded\n");
|
||||
xf86AddInputDriver(&VMMOUSE, module, 0);
|
||||
|
||||
#ifndef NO_MOUSE_MODULE
|
||||
{
|
||||
char *name;
|
||||
/*
|
||||
* Load the normal mouse module as submodule
|
||||
* If we fail in PreInit later, this allows us to fall back to normal mouse module
|
||||
*/
|
||||
#ifndef NORMALISE_MODULE_NAME
|
||||
name = strdup("mouse");
|
||||
#else
|
||||
/* Normalise the module name */
|
||||
name = xf86NormalizeName("mouse");
|
||||
#endif
|
||||
|
||||
if (!LoadSubModule(module, name, NULL, NULL, NULL, NULL, errmaj, errmin)) {
|
||||
LoaderErrorMsg(NULL, name, *errmaj, *errmin);
|
||||
}
|
||||
free(name);
|
||||
}
|
||||
#endif
|
||||
|
||||
return module;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,9 +39,7 @@ extern int vmmouse_uses_kernel_driver(void);
|
||||
void
|
||||
segvCB(int sig)
|
||||
{
|
||||
#if defined HAVE_XORG_SERVER_1_1_0
|
||||
exit(1);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user