devilhorns pushed a commit to branch master.

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

commit 2e00a5ebbde696b11b69c494e3e7ef77c1d57dcb
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Mon Nov 30 10:11:08 2015 -0500

    ecore-wl2: Remove unnecessary use of MIN macro
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/lib/ecore_wl2/ecore_wl2_input.c   | 23 +++++++++++++----------
 src/lib/ecore_wl2/ecore_wl2_private.h |  4 ----
 src/lib/ecore_wl2/ecore_wl2_seat.c    |  2 +-
 3 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c 
b/src/lib/ecore_wl2/ecore_wl2_input.c
index 7ccf1d1..cc37b1f 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -1098,9 +1098,10 @@ _seat_cb_capabilities(void *data, struct wl_seat *seat, 
enum wl_seat_capability
         if (input->cursor.surface) wl_surface_destroy(input->cursor.surface);
         input->cursor.surface = NULL;
 
-        if (input->seat_version >= WL_POINTER_RELEASE_SINCE_VERSION)
-          wl_pointer_release(input->wl.pointer);
-        else
+        /* FIXME: Enable these when new wayland git is released */
+        /* if (input->seat_version >= WL_POINTER_RELEASE_SINCE_VERSION) */
+        /*   wl_pointer_release(input->wl.pointer); */
+        /* else */
           wl_pointer_destroy(input->wl.pointer);
         input->wl.pointer = NULL;
      }
@@ -1113,9 +1114,10 @@ _seat_cb_capabilities(void *data, struct wl_seat *seat, 
enum wl_seat_capability
      }
    else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && (input->wl.keyboard))
      {
-        if (input->seat_version >= WL_KEYBOARD_RELEASE_SINCE_VERSION)
-          wl_keyboard_release(input->wl.keyboard);
-        else
+        /* FIXME: Enable these when new wayland git is released */
+        /* if (input->seat_version >= WL_KEYBOARD_RELEASE_SINCE_VERSION) */
+        /*   wl_keyboard_release(input->wl.keyboard); */
+        /* else */
           wl_keyboard_destroy(input->wl.keyboard);
         input->wl.keyboard = NULL;
      }
@@ -1128,9 +1130,10 @@ _seat_cb_capabilities(void *data, struct wl_seat *seat, 
enum wl_seat_capability
      }
    else if (!(caps & WL_SEAT_CAPABILITY_TOUCH) && (input->wl.touch))
      {
-        if (input->seat_version >= WL_TOUCH_RELEASE_SINCE_VERSION)
-          wl_touch_release(input->wl.touch);
-        else
+        /* FIXME: Enable these when new wayland git is released */
+        /* if (input->seat_version >= WL_TOUCH_RELEASE_SINCE_VERSION) */
+        /*   wl_touch_release(input->wl.touch); */
+        /* else */
           wl_touch_destroy(input->wl.touch);
         input->wl.touch = NULL;
      }
@@ -1225,7 +1228,7 @@ _ecore_wl2_input_add(Ecore_Wl2_Display *display, unsigned 
int id, unsigned int v
    if (!input) return;
 
    input->display = display;
-   input->seat_version = MIN(version, 4);
+   input->seat_version = version;
    input->repeat.rate = 0.025;
    input->repeat.delay = 0.4;
    input->repeat.enabled = EINA_TRUE;
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h 
b/src/lib/ecore_wl2/ecore_wl2_private.h
index c428993..7105bba 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -5,10 +5,6 @@
 # include "Ecore_Wl2.h"
 # include "Ecore_Input.h"
 
-# ifndef MIN
-#  define MIN(x, y) (((x) < (y)) ? (x) : (y))
-# endif
-
 /* NB: Test if subsurface protocol is part of wayland code, if not then
  * include our own copy */
 # ifndef WL_SUBSURFACE_ERROR_ENUM
diff --git a/src/lib/ecore_wl2/ecore_wl2_seat.c 
b/src/lib/ecore_wl2/ecore_wl2_seat.c
index 5d7dcdf..8c9880b 100644
--- a/src/lib/ecore_wl2/ecore_wl2_seat.c
+++ b/src/lib/ecore_wl2/ecore_wl2_seat.c
@@ -30,7 +30,7 @@ _seat_cb_bind(struct wl_client *client, void *data, uint32_t 
version, uint32_t i
 
    DBG("Seat Bind");
 
-   res = wl_resource_create(client, &wl_seat_interface, MIN(version, 4), id);
+   res = wl_resource_create(client, &wl_seat_interface, version, id);
    if (!res)
      {
         ERR("Failed to create seat resource: %m");

-- 


Reply via email to