Elm Glayer: Added number of fingers to Momentum Info
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 30 Oct 2011 10:08:01 +0000 (10:08 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 30 Oct 2011 10:08:01 +0000 (10:08 +0000)
Signed-off-by: Aharon Hillel <a.hillel@partner.samsung.com>
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@64520 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/Elementary.h.in
src/lib/elm_gesture_layer.c

index a500e94..8830a94 100644 (file)
@@ -12719,6 +12719,8 @@ extern "C" {
 
         Evas_Coord mx; /**< Momentum on X */
         Evas_Coord my; /**< Momentum on Y */
+
+        unsigned int n;  /**< Number of fingers */
      };
 
    /**
index 0c5ba5e..8fd8524 100644 (file)
@@ -174,7 +174,6 @@ struct _Momentum_Type
    unsigned int t_st_y;  /* Time start on Y */
    unsigned int t_end;   /* Time end        */
    unsigned int t_up; /* Recent up event time */
-   int n_fingers;
    int xdir, ydir;
 };
 typedef struct _Momentum_Type Momentum_Type;
@@ -1729,10 +1728,11 @@ _momentum_test(Evas_Object *obj, Pointer_Event *pe,
    pe_local.y /= cnt;
 
    /* If user added finger - reset gesture */
-   if ((st->n_fingers) && (st->n_fingers < cnt))
+   if ((st->info.n) && (st->info.n < cnt))
      state_to_report = ELM_GESTURE_STATE_ABORT;
 
-   st->n_fingers = cnt;
+   if (st->info.n < cnt)
+     st->info.n = cnt;
 
    Evas_Event_Flags ev_flag = EVAS_EVENT_FLAG_NONE;
    switch (event_type)