raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f40c91941d5992b4a12802c42e709cbd9861faa1

commit f40c91941d5992b4a12802c42e709cbd9861faa1
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Sun Nov 12 21:44:42 2017 +0900

    libinput check - move up to requiring 1.6 as a minimum for libinput
---
 configure.ac                        | 34 ++--------------------------------
 src/lib/ecore_drm/ecore_drm_evdev.c |  8 --------
 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])
 
 
 #### Ecore_Drm
-have_libinput_new="no"
 EFL_LIB_START_OPTIONAL([Ecore_Drm], [test "${want_ecore_drm}" = "yes"])
 
 ### Additional options to configure
@@ -3763,24 +3762,10 @@ EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [efl])
 EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [eina])
 
 EFL_DEPEND_PKG([ECORE_DRM], [DRM], [libdrm >= 2.4 xkbcommon >= 0.3.0 gbm])
-EFL_DEPEND_PKG([ECORE_DRM], [LIBINPUT], [libinput >= 0.6.0])
+EFL_DEPEND_PKG([ECORE_DRM], [LIBINPUT], [libinput >= 1.6.0])
 
 EFL_ADD_LIBS([ECORE_DRM], [-lm])
 
-# API change from 0.7 to 0.8. So we define this to support both for now.
-PKG_CHECK_EXISTS([libinput >= 0.8.0],
-                 [have_libinput_new="yes"],
-                 [have_libinput_new="no"])
-AC_MSG_CHECKING([Use new libinput API (newer than 0.8.0)])
-AC_MSG_RESULT([${have_libinput_new}])
-if test "x${have_libinput_new}" = "xyes";then
-  AC_DEFINE_UNQUOTED([LIBINPUT_HIGHER_08], [1], [libinput version >= 0.8])
-fi
-if test "x${have_libinput_new}" = "xno";then
-  AC_DEFINE_UNQUOTED([LIBINPUT_HIGHER_08], [0], [libinput version >= 0.8])
-fi
-
-
 EFL_EVAL_PKGS([ECORE_DRM])
 
 ### Checks for header files
@@ -3800,7 +3785,6 @@ EFL_LIB_END_OPTIONAL([Ecore_Drm])
 
 
 #### Elput
-have_libinput_new="no"
 EFL_LIB_START_OPTIONAL([Elput], [test "${want_elput}" = "yes"])
 
 ### Additional options to configure
@@ -3821,26 +3805,13 @@ EFL_INTERNAL_DEPEND_PKG([ELPUT], [eeze])
 EFL_INTERNAL_DEPEND_PKG([ELPUT], [eo])
 EFL_INTERNAL_DEPEND_PKG([ELPUT], [eina])
 
-EFL_DEPEND_PKG([ELPUT], [LIBINPUT], [libinput >= 0.6.0 xkbcommon >= 0.3.0 
libudev])
+EFL_DEPEND_PKG([ELPUT], [LIBINPUT], [libinput >= 1.6.0 xkbcommon >= 0.3.0 
libudev])
 
 EFL_OPTIONAL_DEPEND_PKG([ELPUT], [${want_systemd}], [SYSTEMD], [libsystemd])
 EFL_ADD_FEATURE([ELPUT], [systemd-logind], [${want_systemd}])
 
 EFL_ADD_LIBS([ELPUT], [-lm])
 
-# API change from 0.7 to 0.8. So we define this to support both for now.
-PKG_CHECK_EXISTS([libinput >= 0.8.0],
-                 [have_libinput_new="yes"],
-                 [have_libinput_new="no"])
-AC_MSG_CHECKING([Use new libinput API (newer than 0.8.0)])
-AC_MSG_RESULT([${have_libinput_new}])
-if test "x${have_libinput_new}" = "xyes";then
-  AC_DEFINE_UNQUOTED([LIBINPUT_HIGHER_08], [1], [libinput version >= 0.8])
-fi
-if test "x${have_libinput_new}" = "xno";then
-  AC_DEFINE_UNQUOTED([LIBINPUT_HIGHER_08], [0], [libinput version >= 0.8])
-fi
-
 
 EFL_EVAL_PKGS([ELPUT])
 
@@ -3860,7 +3831,6 @@ EFL_LIB_END_OPTIONAL([Elput])
 #### End of Elput
 
 #### Ecore_Drm2
-have_libinput_new="no"
 EFL_LIB_START_OPTIONAL([Ecore_Drm2], [test "${want_drm}" = "yes"])
 
 ### 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
      ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev, NULL, NULL);
 }
 
-#if LIBINPUT_HIGHER_08
 static double
 _event_scroll_get(struct libinput_event_pointer *pe, enum 
libinput_pointer_axis axis)
 {
@@ -599,7 +598,6 @@ _event_scroll_get(struct libinput_event_pointer *pe, enum 
libinput_pointer_axis
      }
    return 0.0;
 }
-#endif
 
 static void 
 _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
    ev->root.x = ev->x;
    ev->root.y = ev->y;
 
-#if LIBINPUT_HIGHER_08
    axis = LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL;
    if (libinput_event_pointer_has_axis(event, axis))
      ev->z = _event_scroll_get(event, axis);
@@ -642,11 +639,6 @@ _device_handle_axis(struct libinput_device *device, struct 
libinput_event_pointe
         ev->direction = 1;
         ev->z = _event_scroll_get(event, axis);
      }
-#else
-   axis = libinput_event_pointer_get_axis(event);
-   if (axis == LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL) ev->direction = 1;
-   ev->z = libinput_event_pointer_get_axis_value(event);
-#endif
 
    ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, ev, NULL, NULL);
 }
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
    ptr = _evdev_pointer_get(dev->seat);
    if (!ptr) return EINA_FALSE;
 
-#ifdef LIBINPUT_HIGHER_08
    vert =
      libinput_event_pointer_has_axis(event,
                                      LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL);
@@ -1213,12 +1212,6 @@ _pointer_axis(struct libinput_device *idevice, struct 
libinput_event_pointer *ev
         dir = 1;
      }
 
-#else
-   axis = libinput_event_pointer_get_axis(event);
-   if (axis == LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL) dir = 1;
-   val = libinput_event_pointer_get_axis_value(event);
-#endif
-
    ptr->timestamp = libinput_event_pointer_get_time(event);
 
    _pointer_axis_send(dev, dir, val);

-- 


Reply via email to