diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2017-11-12 21:44:42 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2017-11-12 21:47:02 +0900 |
commit | f40c91941d5992b4a12802c42e709cbd9861faa1 (patch) | |
tree | 2e5030ca6f8776b955ca7fc38aabff922710dbdd | |
parent | a2a0ccf36b5becdd00005f339e03bb19154f8fdc (diff) |
libinput check - move up to requiring 1.6 as a minimum for libinput
Diffstat (limited to '')
-rw-r--r-- | configure.ac | 34 | ||||
-rw-r--r-- | src/lib/ecore_drm/ecore_drm_evdev.c | 8 | ||||
-rw-r--r-- | src/lib/elput/elput_evdev.c | 7 |
3 files changed, 2 insertions, 47 deletions
diff --git a/configure.ac b/configure.ac index fe9be24fd9..ba9b78318e 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -3740,7 +3740,6 @@ EFL_LIB_END([Eldbus]) | |||
3740 | 3740 | ||
3741 | 3741 | ||
3742 | #### Ecore_Drm | 3742 | #### Ecore_Drm |
3743 | have_libinput_new="no" | ||
3744 | EFL_LIB_START_OPTIONAL([Ecore_Drm], [test "${want_ecore_drm}" = "yes"]) | 3743 | EFL_LIB_START_OPTIONAL([Ecore_Drm], [test "${want_ecore_drm}" = "yes"]) |
3745 | 3744 | ||
3746 | ### Additional options to configure | 3745 | ### Additional options to configure |
@@ -3763,24 +3762,10 @@ EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [efl]) | |||
3763 | EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [eina]) | 3762 | EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [eina]) |
3764 | 3763 | ||
3765 | EFL_DEPEND_PKG([ECORE_DRM], [DRM], [libdrm >= 2.4 xkbcommon >= 0.3.0 gbm]) | 3764 | EFL_DEPEND_PKG([ECORE_DRM], [DRM], [libdrm >= 2.4 xkbcommon >= 0.3.0 gbm]) |
3766 | EFL_DEPEND_PKG([ECORE_DRM], [LIBINPUT], [libinput >= 0.6.0]) | 3765 | EFL_DEPEND_PKG([ECORE_DRM], [LIBINPUT], [libinput >= 1.6.0]) |
3767 | 3766 | ||
3768 | EFL_ADD_LIBS([ECORE_DRM], [-lm]) | 3767 | EFL_ADD_LIBS([ECORE_DRM], [-lm]) |
3769 | 3768 | ||
3770 | # API change from 0.7 to 0.8. So we define this to support both for now. | ||
3771 | PKG_CHECK_EXISTS([libinput >= 0.8.0], | ||
3772 | [have_libinput_new="yes"], | ||
3773 | [have_libinput_new="no"]) | ||
3774 | AC_MSG_CHECKING([Use new libinput API (newer than 0.8.0)]) | ||
3775 | AC_MSG_RESULT([${have_libinput_new}]) | ||
3776 | if test "x${have_libinput_new}" = "xyes";then | ||
3777 | AC_DEFINE_UNQUOTED([LIBINPUT_HIGHER_08], [1], [libinput version >= 0.8]) | ||
3778 | fi | ||
3779 | if test "x${have_libinput_new}" = "xno";then | ||
3780 | AC_DEFINE_UNQUOTED([LIBINPUT_HIGHER_08], [0], [libinput version >= 0.8]) | ||
3781 | fi | ||
3782 | |||
3783 | |||
3784 | EFL_EVAL_PKGS([ECORE_DRM]) | 3769 | EFL_EVAL_PKGS([ECORE_DRM]) |
3785 | 3770 | ||
3786 | ### Checks for header files | 3771 | ### Checks for header files |
@@ -3800,7 +3785,6 @@ EFL_LIB_END_OPTIONAL([Ecore_Drm]) | |||
3800 | 3785 | ||
3801 | 3786 | ||
3802 | #### Elput | 3787 | #### Elput |
3803 | have_libinput_new="no" | ||
3804 | EFL_LIB_START_OPTIONAL([Elput], [test "${want_elput}" = "yes"]) | 3788 | EFL_LIB_START_OPTIONAL([Elput], [test "${want_elput}" = "yes"]) |
3805 | 3789 | ||
3806 | ### Additional options to configure | 3790 | ### Additional options to configure |
@@ -3821,26 +3805,13 @@ EFL_INTERNAL_DEPEND_PKG([ELPUT], [eeze]) | |||
3821 | EFL_INTERNAL_DEPEND_PKG([ELPUT], [eo]) | 3805 | EFL_INTERNAL_DEPEND_PKG([ELPUT], [eo]) |
3822 | EFL_INTERNAL_DEPEND_PKG([ELPUT], [eina]) | 3806 | EFL_INTERNAL_DEPEND_PKG([ELPUT], [eina]) |
3823 | 3807 | ||
3824 | EFL_DEPEND_PKG([ELPUT], [LIBINPUT], [libinput >= 0.6.0 xkbcommon >= 0.3.0 libudev]) | 3808 | EFL_DEPEND_PKG([ELPUT], [LIBINPUT], [libinput >= 1.6.0 xkbcommon >= 0.3.0 libudev]) |
3825 | 3809 | ||
3826 | EFL_OPTIONAL_DEPEND_PKG([ELPUT], [${want_systemd}], [SYSTEMD], [libsystemd]) | 3810 | EFL_OPTIONAL_DEPEND_PKG([ELPUT], [${want_systemd}], [SYSTEMD], [libsystemd]) |
3827 | EFL_ADD_FEATURE([ELPUT], [systemd-logind], [${want_systemd}]) | 3811 | EFL_ADD_FEATURE([ELPUT], [systemd-logind], [${want_systemd}]) |
3828 | 3812 | ||
3829 | EFL_ADD_LIBS([ELPUT], [-lm]) | 3813 | EFL_ADD_LIBS([ELPUT], [-lm]) |
3830 | 3814 | ||
3831 | # API change from 0.7 to 0.8. So we define this to support both for now. | ||
3832 | PKG_CHECK_EXISTS([libinput >= 0.8.0], | ||
3833 | [have_libinput_new="yes"], | ||
3834 | [have_libinput_new="no"]) | ||
3835 | AC_MSG_CHECKING([Use new libinput API (newer than 0.8.0)]) | ||
3836 | AC_MSG_RESULT([${have_libinput_new}]) | ||
3837 | if test "x${have_libinput_new}" = "xyes";then | ||
3838 | AC_DEFINE_UNQUOTED([LIBINPUT_HIGHER_08], [1], [libinput version >= 0.8]) | ||
3839 | fi | ||
3840 | if test "x${have_libinput_new}" = "xno";then | ||
3841 | AC_DEFINE_UNQUOTED([LIBINPUT_HIGHER_08], [0], [libinput version >= 0.8]) | ||
3842 | fi | ||
3843 | |||
3844 | 3815 | ||
3845 | EFL_EVAL_PKGS([ELPUT]) | 3816 | EFL_EVAL_PKGS([ELPUT]) |
3846 | 3817 | ||
@@ -3860,7 +3831,6 @@ EFL_LIB_END_OPTIONAL([Elput]) | |||
3860 | #### End of Elput | 3831 | #### End of Elput |
3861 | 3832 | ||
3862 | #### Ecore_Drm2 | 3833 | #### Ecore_Drm2 |
3863 | have_libinput_new="no" | ||
3864 | EFL_LIB_START_OPTIONAL([Ecore_Drm2], [test "${want_drm}" = "yes"]) | 3834 | EFL_LIB_START_OPTIONAL([Ecore_Drm2], [test "${want_drm}" = "yes"]) |
3865 | 3835 | ||
3866 | ### Additional options to configure | 3836 | ### Additional options to configure |
diff --git a/src/lib/ecore_drm/ecore_drm_evdev.c b/src/lib/ecore_drm/ecore_drm_evdev.c index 4e5ad4527b..3cc1f74bce 100644 --- a/src/lib/ecore_drm/ecore_drm_evdev.c +++ b/src/lib/ecore_drm/ecore_drm_evdev.c | |||
@@ -585,7 +585,6 @@ _device_handle_button(struct libinput_device *device, struct libinput_event_poin | |||
585 | ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev, NULL, NULL); | 585 | ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev, NULL, NULL); |
586 | } | 586 | } |
587 | 587 | ||
588 | #if LIBINPUT_HIGHER_08 | ||
589 | static double | 588 | static double |
590 | _event_scroll_get(struct libinput_event_pointer *pe, enum libinput_pointer_axis axis) | 589 | _event_scroll_get(struct libinput_event_pointer *pe, enum libinput_pointer_axis axis) |
591 | { | 590 | { |
@@ -599,7 +598,6 @@ _event_scroll_get(struct libinput_event_pointer *pe, enum libinput_pointer_axis | |||
599 | } | 598 | } |
600 | return 0.0; | 599 | return 0.0; |
601 | } | 600 | } |
602 | #endif | ||
603 | 601 | ||
604 | static void | 602 | static void |
605 | _device_handle_axis(struct libinput_device *device, struct libinput_event_pointer *event) | 603 | _device_handle_axis(struct libinput_device *device, struct libinput_event_pointer *event) |
@@ -631,7 +629,6 @@ _device_handle_axis(struct libinput_device *device, struct libinput_event_pointe | |||
631 | ev->root.x = ev->x; | 629 | ev->root.x = ev->x; |
632 | ev->root.y = ev->y; | 630 | ev->root.y = ev->y; |
633 | 631 | ||
634 | #if LIBINPUT_HIGHER_08 | ||
635 | axis = LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL; | 632 | axis = LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL; |
636 | if (libinput_event_pointer_has_axis(event, axis)) | 633 | if (libinput_event_pointer_has_axis(event, axis)) |
637 | ev->z = _event_scroll_get(event, axis); | 634 | ev->z = _event_scroll_get(event, axis); |
@@ -642,11 +639,6 @@ _device_handle_axis(struct libinput_device *device, struct libinput_event_pointe | |||
642 | ev->direction = 1; | 639 | ev->direction = 1; |
643 | ev->z = _event_scroll_get(event, axis); | 640 | ev->z = _event_scroll_get(event, axis); |
644 | } | 641 | } |
645 | #else | ||
646 | axis = libinput_event_pointer_get_axis(event); | ||
647 | if (axis == LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL) ev->direction = 1; | ||
648 | ev->z = libinput_event_pointer_get_axis_value(event); | ||
649 | #endif | ||
650 | 642 | ||
651 | ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, ev, NULL, NULL); | 643 | ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, ev, NULL, NULL); |
652 | } | 644 | } |
diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c index b41fbe508b..4943c45f4d 100644 --- a/src/lib/elput/elput_evdev.c +++ b/src/lib/elput/elput_evdev.c | |||
@@ -1191,7 +1191,6 @@ _pointer_axis(struct libinput_device *idevice, struct libinput_event_pointer *ev | |||
1191 | ptr = _evdev_pointer_get(dev->seat); | 1191 | ptr = _evdev_pointer_get(dev->seat); |
1192 | if (!ptr) return EINA_FALSE; | 1192 | if (!ptr) return EINA_FALSE; |
1193 | 1193 | ||
1194 | #ifdef LIBINPUT_HIGHER_08 | ||
1195 | vert = | 1194 | vert = |
1196 | libinput_event_pointer_has_axis(event, | 1195 | libinput_event_pointer_has_axis(event, |
1197 | LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL); | 1196 | LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL); |
@@ -1213,12 +1212,6 @@ _pointer_axis(struct libinput_device *idevice, struct libinput_event_pointer *ev | |||
1213 | dir = 1; | 1212 | dir = 1; |
1214 | } | 1213 | } |
1215 | 1214 | ||
1216 | #else | ||
1217 | axis = libinput_event_pointer_get_axis(event); | ||
1218 | if (axis == LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL) dir = 1; | ||
1219 | val = libinput_event_pointer_get_axis_value(event); | ||
1220 | #endif | ||
1221 | |||
1222 | ptr->timestamp = libinput_event_pointer_get_time(event); | 1215 | ptr->timestamp = libinput_event_pointer_get_time(event); |
1223 | 1216 | ||
1224 | _pointer_axis_send(dev, dir, val); | 1217 | _pointer_axis_send(dev, dir, val); |