Skip to content

Commit

Permalink
src: fix the build for xserver 1.19 and later
Browse files Browse the repository at this point in the history
We suffer from the same thing other X input drivers suffered, see
for example https://bugs.gentoo.org/show_bug.cgi?id=599938

Let's use the same fix proposed there.
  • Loading branch information
merge committed Apr 26, 2017
1 parent b5e40bd commit 93673ab
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/tslib.c
Expand Up @@ -89,6 +89,10 @@ xf86XInputSetScreen(InputInfoPtr pInfo,
}
#endif

#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 23
#define HAVE_THREADED_INPUT 1
#endif

enum { TSLIB_ROTATE_NONE = 0, TSLIB_ROTATE_CW = 270, TSLIB_ROTATE_UD = 180, TSLIB_ROTATE_CCW = 90 };

enum button_state { BUTTON_NOT_PRESSED = 0, BUTTON_1_PRESSED = 1, BUTTON_3_CLICK = 3, BUTTON_3_CLICKED = 4, BUTTON_EMULATION_OFF = -1 };
Expand Down Expand Up @@ -435,8 +439,11 @@ xf86TslibControlProc(DeviceIntPtr device, int what)
break;

case DEVICE_ON:
#if HAVE_THREADED_INPUT
xf86AddEnabledDevice(pInfo);
#else
AddEnabledDevice(pInfo->fd);

#endif
device->public.on = TRUE;
break;

Expand Down

0 comments on commit 93673ab

Please sign in to comment.