disable double click flags if u clock on something else in between
authorCarsten Haitzler <raster@rasterman.com>
Sat, 18 Feb 2006 04:40:14 +0000 (04:40 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Sat, 18 Feb 2006 04:40:14 +0000 (04:40 +0000)
SVN revision: 20554

legacy/evas/src/lib/canvas/evas_events.c
legacy/evas/src/lib/include/evas_private.h

index fa632adef5c33f9d6aae2c77c2d7c9f278dd70fb..10b1ab849227333008ce6addf8a1e590bb7015c1 100644 (file)
@@ -255,10 +255,17 @@ evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int
        ev.locks = &(e->locks);
        ev.flags = flags;
        ev.timestamp = timestamp;
+       if (ev.flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK))
+         {
+            if (obj->last_click_counter < (e->last_click_counter - 1))
+              ev.flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK);
+         }
        if (e->events_frozen <= 0)
          evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_DOWN, &ev);
+       obj->last_click_counter = e->last_click_counter;
      }
    if (copy) copy = evas_list_free(copy);
+   e->last_click_counter++;
 }
 
 /**
index fb02ccb830e9eddea16708287647d88c6d9b19f7..ce08400343868d4f94a979568c4127f2c2d78842 100644 (file)
@@ -329,6 +329,7 @@ struct _Evas
    Evas_Lock      locks;
    unsigned int   last_timestamp;
    void          *attach_data;
+   int            last_click_counter;
 };
 
 struct _Evas_Layer
@@ -414,6 +415,7 @@ struct _Evas_Object
       unsigned char     deletions_waiting : 1;
    } smart;
 
+   int                         last_click_counter;
    int                         mouse_grabbed;
 
    unsigned short              store : 1;