ecore-wl2: Enable releasing keyboard, pointer, and touch if supported
authorChris Michael <cpmichael@osg.samsung.com>
Fri, 1 Apr 2016 16:22:02 +0000 (12:22 -0400)
committerChris Michael <cpmichael@osg.samsung.com>
Fri, 1 Apr 2016 16:22:02 +0000 (12:22 -0400)
This removes a fixme where we were not using wl_(pointer, keyboard,
touch)_release functions as they rely on newer versions of the wayland
protocol. As we now rely on 1.10 of wayland, these can be enabled now.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
src/lib/ecore_wl2/ecore_wl2_input.c

index f3623258c1a9735e9da28f8597947f424fa12c86..14a7e8262e463d749cd326accd6cb0d2374519c1 100644 (file)
@@ -1099,10 +1099,11 @@ _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;
 
-        /* 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 */
+#ifdef WL_POINTER_RELEASE_SINCE_VERSION
+        if (input->seat_version >= WL_POINTER_RELEASE_SINCE_VERSION)
+          wl_pointer_release(input->wl.pointer);
+        else
+#endif
           wl_pointer_destroy(input->wl.pointer);
         input->wl.pointer = NULL;
      }
@@ -1115,10 +1116,11 @@ _seat_cb_capabilities(void *data, struct wl_seat *seat, enum wl_seat_capability
      }
    else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && (input->wl.keyboard))
      {
-        /* 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 */
+#ifdef WL_KEYBOARD_RELEASE_SINCE_VERSION
+        if (input->seat_version >= WL_KEYBOARD_RELEASE_SINCE_VERSION)
+          wl_keyboard_release(input->wl.keyboard);
+        else
+#endif
           wl_keyboard_destroy(input->wl.keyboard);
         input->wl.keyboard = NULL;
      }
@@ -1131,10 +1133,11 @@ _seat_cb_capabilities(void *data, struct wl_seat *seat, enum wl_seat_capability
      }
    else if (!(caps & WL_SEAT_CAPABILITY_TOUCH) && (input->wl.touch))
      {
-        /* 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 */
+#ifdef WL_TOUCH_RELEASE_SINCE_VERSION
+        if (input->seat_version >= WL_TOUCH_RELEASE_SINCE_VERSION)
+          wl_touch_release(input->wl.touch);
+        else
+#endif
           wl_touch_destroy(input->wl.touch);
         input->wl.touch = NULL;
      }