mirror of
https://github.com/X11Libre/xf86-input-libinput.git
synced 2026-04-14 10:54:17 +00:00
Compare commits
15 Commits
incubate
...
submit/uti
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d30a76fb1 | ||
|
|
7d617d1150 | ||
|
|
2146a29bdf | ||
|
|
64def2e59a | ||
|
|
8a743e7740 | ||
|
|
87dc6b6a3e | ||
|
|
110f454c1e | ||
|
|
bd7f165019 | ||
|
|
49ee2103a1 | ||
|
|
318a6119a8 | ||
|
|
6465d3cae8 | ||
|
|
94cfaa6b2d | ||
|
|
d941ac25f1 | ||
|
|
0ef9a59835 | ||
|
|
c77c82d92c |
@@ -43,8 +43,6 @@ m4_ifndef([XORG_MACROS_VERSION],
|
|||||||
XORG_MACROS_VERSION(1.8)
|
XORG_MACROS_VERSION(1.8)
|
||||||
XORG_DEFAULT_OPTIONS
|
XORG_DEFAULT_OPTIONS
|
||||||
|
|
||||||
CFLAGS="$CFLAGS -Wno-declaration-after-statement"
|
|
||||||
|
|
||||||
# Obtain compiler/linker options from server and required extensions
|
# Obtain compiler/linker options from server and required extensions
|
||||||
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.19] xproto [inputproto >= 2.2])
|
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.19] xproto [inputproto >= 2.2])
|
||||||
PKG_CHECK_MODULES(LIBINPUT, [libinput >= 1.11.0])
|
PKG_CHECK_MODULES(LIBINPUT, [libinput >= 1.11.0])
|
||||||
|
|||||||
@@ -92,9 +92,7 @@ strv_from_string(const char *in, const char *separators, size_t *num_elements)
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t strv_len = nelems + 1; /* NULL-terminated */
|
size_t strv_len = nelems + 1; /* NULL-terminated */
|
||||||
char **strv = calloc(strv_len, sizeof(*strv));
|
char **strv = zalloc(strv_len * sizeof *strv);
|
||||||
if (!strv)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
size_t idx = 0;
|
size_t idx = 0;
|
||||||
const char *word;
|
const char *word;
|
||||||
|
|||||||
@@ -137,10 +137,7 @@ double_array_from_string(const char *in,
|
|||||||
if(!strv)
|
if(!strv)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
double *numv = calloc(nelem, sizeof(double));
|
double *numv = zalloc(sizeof(double) * nelem);
|
||||||
if (!numv)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
for (size_t idx = 0; idx < nelem; idx++) {
|
for (size_t idx = 0; idx < nelem; idx++) {
|
||||||
double val;
|
double val;
|
||||||
if (!safe_atod(strv[idx], &val))
|
if (!safe_atod(strv[idx], &val))
|
||||||
|
|||||||
@@ -141,10 +141,6 @@ struct accel_points {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct xf86libinput_pressure_range {
|
|
||||||
float min, max;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct xf86libinput {
|
struct xf86libinput {
|
||||||
InputInfoPtr pInfo;
|
InputInfoPtr pInfo;
|
||||||
char *path;
|
char *path;
|
||||||
@@ -203,7 +199,9 @@ struct xf86libinput {
|
|||||||
|
|
||||||
float rotation_angle;
|
float rotation_angle;
|
||||||
struct bezier_control_point pressurecurve[4];
|
struct bezier_control_point pressurecurve[4];
|
||||||
struct xf86libinput_pressure_range pressure_range;
|
struct range {
|
||||||
|
float min, max;
|
||||||
|
} pressure_range;
|
||||||
struct ratio {
|
struct ratio {
|
||||||
int x, y;
|
int x, y;
|
||||||
} area;
|
} area;
|
||||||
@@ -469,7 +467,7 @@ xf86libinput_set_pressurecurve(struct xf86libinput *driver_data,
|
|||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
xf86libinput_set_pressure_range(struct xf86libinput *driver_data,
|
xf86libinput_set_pressure_range(struct xf86libinput *driver_data,
|
||||||
const struct xf86libinput_pressure_range *rangeopt)
|
const struct range *rangeopt)
|
||||||
{
|
{
|
||||||
#if HAVE_LIBINPUT_PRESSURE_RANGE
|
#if HAVE_LIBINPUT_PRESSURE_RANGE
|
||||||
struct libinput_tablet_tool *tool = driver_data->tablet_tool;
|
struct libinput_tablet_tool *tool = driver_data->tablet_tool;
|
||||||
@@ -941,7 +939,7 @@ LibinputApplyConfigPressureRange(DeviceIntPtr dev,
|
|||||||
#if HAVE_LIBINPUT_PRESSURE_RANGE
|
#if HAVE_LIBINPUT_PRESSURE_RANGE
|
||||||
InputInfoPtr pInfo = dev->public.devicePrivate;
|
InputInfoPtr pInfo = dev->public.devicePrivate;
|
||||||
struct libinput_tablet_tool *tool = driver_data->tablet_tool;
|
struct libinput_tablet_tool *tool = driver_data->tablet_tool;
|
||||||
struct xf86libinput_pressure_range *rangeopt = &driver_data->options.pressure_range;
|
struct range *rangeopt = &driver_data->options.pressure_range;
|
||||||
|
|
||||||
if (!subdevice_has_capabilities(dev, CAP_TABLET_TOOL))
|
if (!subdevice_has_capabilities(dev, CAP_TABLET_TOOL))
|
||||||
return;
|
return;
|
||||||
@@ -2741,12 +2739,6 @@ xf86libinput_handle_event(struct libinput_event *event)
|
|||||||
break;
|
break;
|
||||||
case LIBINPUT_EVENT_SWITCH_TOGGLE:
|
case LIBINPUT_EVENT_SWITCH_TOGGLE:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// new libinput events we don't handle yet
|
|
||||||
case LIBINPUT_EVENT_GESTURE_HOLD_BEGIN:
|
|
||||||
case LIBINPUT_EVENT_GESTURE_HOLD_END:
|
|
||||||
case LIBINPUT_EVENT_TABLET_PAD_KEY:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
@@ -3693,7 +3685,7 @@ out:
|
|||||||
static void
|
static void
|
||||||
xf86libinput_parse_pressure_range_option(InputInfoPtr pInfo,
|
xf86libinput_parse_pressure_range_option(InputInfoPtr pInfo,
|
||||||
struct xf86libinput *driver_data,
|
struct xf86libinput *driver_data,
|
||||||
struct xf86libinput_pressure_range *rangeopt)
|
struct range *rangeopt)
|
||||||
{
|
{
|
||||||
#if HAVE_LIBINPUT_PRESSURE_RANGE
|
#if HAVE_LIBINPUT_PRESSURE_RANGE
|
||||||
struct libinput_tablet_tool *tool = driver_data->tablet_tool;
|
struct libinput_tablet_tool *tool = driver_data->tablet_tool;
|
||||||
@@ -5392,7 +5384,7 @@ LibinputSetPropertyPressureRange(DeviceIntPtr dev,
|
|||||||
InputInfoPtr pInfo = dev->public.devicePrivate;
|
InputInfoPtr pInfo = dev->public.devicePrivate;
|
||||||
struct xf86libinput *driver_data = pInfo->private;
|
struct xf86libinput *driver_data = pInfo->private;
|
||||||
float *vals;
|
float *vals;
|
||||||
struct xf86libinput_pressure_range rangeopt = { 0.0, 1.0 };
|
struct range rangeopt = { 0.0, 1.0 };
|
||||||
|
|
||||||
if (val->format != 32 || val->size != 2 || val->type != prop_float)
|
if (val->format != 32 || val->size != 2 || val->type != prop_float)
|
||||||
return BadMatch;
|
return BadMatch;
|
||||||
@@ -6671,7 +6663,7 @@ LibinputInitPressureRangeProperty(DeviceIntPtr dev,
|
|||||||
{
|
{
|
||||||
#if HAVE_LIBINPUT_PRESSURE_RANGE
|
#if HAVE_LIBINPUT_PRESSURE_RANGE
|
||||||
struct libinput_tablet_tool *tool = driver_data->tablet_tool;
|
struct libinput_tablet_tool *tool = driver_data->tablet_tool;
|
||||||
const struct xf86libinput_pressure_range *rangeopt = &driver_data->options.pressure_range;
|
const struct range *rangeopt = &driver_data->options.pressure_range;
|
||||||
float data[2] = {
|
float data[2] = {
|
||||||
rangeopt->min,
|
rangeopt->min,
|
||||||
rangeopt->max,
|
rangeopt->max,
|
||||||
|
|||||||
Reference in New Issue
Block a user