mirror of
https://github.com/X11Libre/xf86-input-mouse.git
synced 2026-03-24 01:24:06 +00:00
drop compat for ancient xserver versions
We're relying on at least 1.18 now. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
a39b3fa7a8
commit
c4dfa6803a
@@ -48,7 +48,7 @@ XORG_WITH_LINT
|
||||
AC_CHECK_FUNCS([asprintf timingsafe_memcmp])
|
||||
|
||||
# Obtain compiler/linker options from server and required extensions
|
||||
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10 xproto >= 7.0.27 inputproto])
|
||||
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.18 xproto >= 7.0.27 inputproto])
|
||||
|
||||
# Define a configure option for an alternate input module directory
|
||||
PKG_PROG_PKG_CONFIG([0.25])
|
||||
|
||||
@@ -39,7 +39,6 @@ OS_SRCS = bsd_mouse.c hurd_mouse.c lnx_mouse.c sun_mouse.c
|
||||
mouse.h \
|
||||
pnp.c \
|
||||
mousePriv.h \
|
||||
compat-api.h \
|
||||
@OS_MOUSE_NAME@_mouse.c
|
||||
|
||||
EXTRA_DIST = $(OS_SRCS)
|
||||
|
||||
@@ -28,71 +28,4 @@
|
||||
#ifndef COMPAT_API_H
|
||||
#define COMPAT_API_H
|
||||
|
||||
#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR
|
||||
#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum]
|
||||
#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p
|
||||
#endif
|
||||
|
||||
#ifndef XF86_HAS_SCRN_CONV
|
||||
#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum]
|
||||
#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex]
|
||||
#endif
|
||||
|
||||
#ifndef XF86_SCRN_INTERFACE
|
||||
|
||||
#define SCRN_ARG_TYPE int
|
||||
#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)]
|
||||
|
||||
#define SCREEN_ARG_TYPE int
|
||||
#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)]
|
||||
|
||||
#define SCREEN_INIT_ARGS_DECL int i, ScreenPtr pScreen, int argc, char **argv
|
||||
|
||||
#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask
|
||||
#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask
|
||||
|
||||
#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen
|
||||
#define CLOSE_SCREEN_ARGS scrnIndex, pScreen
|
||||
|
||||
#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags
|
||||
#define ADJUST_FRAME_ARGS(arg, x, y) (arg)->scrnIndex, x, y, 0
|
||||
|
||||
#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags
|
||||
#define SWITCH_MODE_ARGS(arg, m) (arg)->scrnIndex, m, 0
|
||||
|
||||
#define FREE_SCREEN_ARGS_DECL int arg, int flags
|
||||
|
||||
#define VT_FUNC_ARGS_DECL int arg, int flags
|
||||
#define VT_FUNC_ARGS pScrn->scrnIndex, 0
|
||||
|
||||
#define SCRN_OR_INDEX_ARG(x) ((x)->scrnIndex)
|
||||
#else
|
||||
#define SCRN_ARG_TYPE ScrnInfoPtr
|
||||
#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1)
|
||||
|
||||
#define SCREEN_ARG_TYPE ScreenPtr
|
||||
#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1)
|
||||
|
||||
#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv
|
||||
|
||||
#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask
|
||||
#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask
|
||||
|
||||
#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen
|
||||
#define CLOSE_SCREEN_ARGS pScreen
|
||||
|
||||
#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y
|
||||
#define ADJUST_FRAME_ARGS(arg, x, y) arg, x, y
|
||||
|
||||
#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode
|
||||
#define SWITCH_MODE_ARGS(arg, m) arg, m
|
||||
#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg
|
||||
|
||||
#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg
|
||||
#define VT_FUNC_ARGS pScrn
|
||||
|
||||
#define SCRN_OR_INDEX_ARG(x) (x)
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -175,9 +175,7 @@ _X_EXPORT InputDriverRec MOUSE = {
|
||||
.UnInit = NULL,
|
||||
.module = NULL,
|
||||
.default_options = NULL,
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 21
|
||||
.capabilities = 0
|
||||
#endif
|
||||
};
|
||||
|
||||
#define RETRY_COUNT 4
|
||||
|
||||
@@ -42,10 +42,6 @@
|
||||
|
||||
#include "xf86Xinput.h"
|
||||
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 18
|
||||
#define LogMessageVerbSigSafe LogMessageVerb
|
||||
#endif
|
||||
|
||||
/* Mouse interface classes */
|
||||
#define MSE_NONE 0x00
|
||||
#define MSE_SERIAL 0x01 /* serial port */
|
||||
|
||||
@@ -127,18 +127,13 @@ static int CheckRelToAbs(InputInfoPtr pInfo);
|
||||
static int CheckRelToAbsWalker(di_node_t node, void *arg);
|
||||
|
||||
#ifdef HAVE_ABSOLUTE_MOUSE_SCALING
|
||||
# include "compat-api.h"
|
||||
|
||||
static void vuidMouseSendScreenSize(ScreenPtr pScreen, VuidMsePtr pVuidMse);
|
||||
static void vuidMouseAdjustFrame(ADJUST_FRAME_ARGS_DECL);
|
||||
static void vuidMouseAdjustFrame(ScrnInfoPtr pScrn, int x, int y);
|
||||
|
||||
static unsigned long vuidMouseGeneration = 0;
|
||||
|
||||
#if HAS_DEVPRIVATEKEYREC
|
||||
static DevPrivateKeyRec vuidMouseScreenIndex;
|
||||
#else
|
||||
static int vuidMouseScreenIndex;
|
||||
#endif /* HAS_DEVPRIVATEKEYREC */
|
||||
|
||||
#define vuidMouseGetScreenPrivate(s) ( \
|
||||
dixLookupPrivate(&(s)->devPrivates, &vuidMouseScreenIndex))
|
||||
@@ -603,9 +598,8 @@ static void vuidMouseSendScreenSize(ScreenPtr pScreen, VuidMsePtr pVuidMse)
|
||||
}
|
||||
}
|
||||
|
||||
static void vuidMouseAdjustFrame(ADJUST_FRAME_ARGS_DECL)
|
||||
static void vuidMouseAdjustFrame(ScrnInfoPtr pScrn, int x, int y)
|
||||
{
|
||||
SCRN_INFO_PTR(arg);
|
||||
ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
|
||||
xf86AdjustFrameProc *wrappedAdjustFrame
|
||||
= (xf86AdjustFrameProc *) vuidMouseGetScreenPrivate(pScreen);
|
||||
@@ -614,7 +608,7 @@ static void vuidMouseAdjustFrame(ADJUST_FRAME_ARGS_DECL)
|
||||
|
||||
if (wrappedAdjustFrame) {
|
||||
pScrn->AdjustFrame = wrappedAdjustFrame;
|
||||
(*pScrn->AdjustFrame)(ADJUST_FRAME_ARGS(pScrn, x, y));
|
||||
(*pScrn->AdjustFrame)(pScrn, x, y);
|
||||
pScrn->AdjustFrame = vuidMouseAdjustFrame;
|
||||
}
|
||||
|
||||
@@ -670,10 +664,8 @@ vuidMouseProc(DeviceIntPtr pPointer, int what)
|
||||
case DEVICE_INIT:
|
||||
#ifdef HAVE_ABSOLUTE_MOUSE_SCALING
|
||||
|
||||
#if HAS_DEVPRIVATEKEYREC
|
||||
if (!dixRegisterPrivateKey(&vuidMouseScreenIndex, PRIVATE_SCREEN, 0))
|
||||
return BadAlloc;
|
||||
#endif /* HAS_DEVPRIVATEKEYREC */
|
||||
|
||||
if (vuidMouseGeneration != serverGeneration) {
|
||||
for (i = 0; i < screenInfo.numScreens; i++) {
|
||||
|
||||
Reference in New Issue
Block a user