+ecore (1.0.0.001+svn.51480slp2+build14) unstable; urgency=low
+
+ * [ecore_x_events.c] fixed double / triple click
+ * Git: 165.213.180.234:/git/slp/pkgs/ecore
+ * Tag: ecore_1.0.0.001+svn.51480slp2+build14
+
+ -- ChunEon Park <chuneon.park@samsung.com> Mon, 04 Oct 2010 21:38:13 +0900
+
ecore (1.0.0.001+svn.51480slp2+build13) unstable; urgency=low
* [ecore_evas] add EFL window rotation effect
static Time _ecore_x_mouse_down_last_time = 0;
static Time _ecore_x_mouse_down_last_last_time = 0;
static int _ecore_x_mouse_up_count = 0;
+static int _ecore_x_mouse_down_did_double = 0;
static int _ecore_x_mouse_down_did_triple = 0;
static int _ecore_x_last_event_mouse_move = 0;
static Ecore_Event *_ecore_x_last_event_mouse_move_event = NULL;
if (event_window == window)
{
- if (((int)(timestamp - _ecore_x_mouse_down_last_time) <=
- (int)(1000 * _ecore_x_double_click_time)) &&
- (window == _ecore_x_mouse_down_last_win) &&
- (event_window == _ecore_x_mouse_down_last_event_win)
- )
- e->double_click = 1;
-
- if (((int)(timestamp - _ecore_x_mouse_down_last_last_time) <=
- (int)(2 * 1000 * _ecore_x_double_click_time)) &&
- (window == _ecore_x_mouse_down_last_win) &&
- (window == _ecore_x_mouse_down_last_last_win) &&
- (event_window == _ecore_x_mouse_down_last_event_win) &&
- (event_window == _ecore_x_mouse_down_last_last_event_win)
- )
- {
- e->triple_click = 1;
- _ecore_x_mouse_down_did_triple = 1;
+ if (event == ECORE_EVENT_MOUSE_BUTTON_DOWN)
+ {
+ if (((int)(timestamp - _ecore_x_mouse_down_last_time) <=
+ (int)(1000 * _ecore_x_double_click_time)) &&
+ (window == _ecore_x_mouse_down_last_win) &&
+ (event_window == _ecore_x_mouse_down_last_event_win)
+ )
+ {
+ e->double_click = 1;
+ _ecore_x_mouse_down_did_double = 1;
+ }
+ else
+ {
+ _ecore_x_mouse_down_did_double = 0;
+ _ecore_x_mouse_down_did_triple = 0;
+ }
+
+ if (((int)(timestamp - _ecore_x_mouse_down_last_last_time) <=
+ (int)(2 * 1000 * _ecore_x_double_click_time)) &&
+ (window == _ecore_x_mouse_down_last_win) &&
+ (window == _ecore_x_mouse_down_last_last_win) &&
+ (event_window == _ecore_x_mouse_down_last_event_win) &&
+ (event_window == _ecore_x_mouse_down_last_last_event_win)
+ )
+ {
+ e->triple_click = 1;
+ _ecore_x_mouse_down_did_triple = 1;
+ }
+ else
+ {
+ _ecore_x_mouse_down_did_triple = 0;
+ }
}
else
- _ecore_x_mouse_down_did_triple = 0;
+ {
+ if (_ecore_x_mouse_down_did_double)
+ e->double_click = 1;
+ if (_ecore_x_mouse_down_did_triple)
+ e->triple_click = 1;
+ }
+
}
if (event == ECORE_EVENT_MOUSE_BUTTON_DOWN