summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_fb/ecore_fb_ts.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2010-10-04 09:02:43 +0000
committerCarsten Haitzler <raster@rasterman.com>2010-10-04 09:02:43 +0000
commit6893412d80523cec05cee1699719bc8df9d65bd4 (patch)
tree5e305002012f3a88b7eb6b5a246b60a275d0ea88 /legacy/ecore/src/lib/ecore_fb/ecore_fb_ts.c
parenta77152c5311db4dcd27e00cc827111388a78fb22 (diff)
aaagh ecore_fb needs double/triple fix too.
SVN revision: 53012
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_fb/ecore_fb_ts.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/legacy/ecore/src/lib/ecore_fb/ecore_fb_ts.c b/legacy/ecore/src/lib/ecore_fb/ecore_fb_ts.c
index dd005df4a3..caef71b7fb 100644
--- a/legacy/ecore/src/lib/ecore_fb/ecore_fb_ts.c
+++ b/legacy/ecore/src/lib/ecore_fb/ecore_fb_ts.c
@@ -211,7 +211,8 @@ _ecore_fb_ts_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __UN
211 int num; 211 int num;
212 char *ptr; 212 char *ptr;
213 double t = 0.0; 213 double t = 0.0;
214 int did_triple = 0; 214 static int did_double = 0;
215 static int did_triple = 0;
215 216
216#ifdef HAVE_TSLIB 217#ifdef HAVE_TSLIB
217 if (_ecore_fb_ts_apply_cal) 218 if (_ecore_fb_ts_apply_cal)
@@ -269,12 +270,24 @@ _ecore_fb_ts_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __UN
269 e->y = y; 270 e->y = y;
270 e->button = 1; 271 e->button = 1;
271 if ((t - last_time) <= _ecore_fb_double_click_time) 272 if ((t - last_time) <= _ecore_fb_double_click_time)
272 e->double_click = 1; 273 {
274 e->double_click = 1;
275 did_double = 1;
276 }
277 else
278 {
279 did_double = 0;
280 did_triple = 0;
281 }
273 if ((t - last_last_time) <= (2 * _ecore_fb_double_click_time)) 282 if ((t - last_last_time) <= (2 * _ecore_fb_double_click_time))
274 { 283 {
275 did_triple = 1; 284 did_triple = 1;
276 e->triple_click = 1; 285 e->triple_click = 1;
277 } 286 }
287 else
288 {
289 did_triple = 0;
290 }
278 ecore_event_add(ECORE_FB_EVENT_MOUSE_BUTTON_DOWN, e, NULL, NULL); 291 ecore_event_add(ECORE_FB_EVENT_MOUSE_BUTTON_DOWN, e, NULL, NULL);
279 } 292 }
280 else if ((!pressure) && (prev_pressure)) 293 else if ((!pressure) && (prev_pressure))
@@ -287,6 +300,10 @@ _ecore_fb_ts_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __UN
287 e->x = prev_x; 300 e->x = prev_x;
288 e->y = prev_y; 301 e->y = prev_y;
289 e->button = 1; 302 e->button = 1;
303 if (did_double)
304 e->double_click = 1;
305 if (did_triple)
306 e->triple_click = 1;
290 ecore_event_add(ECORE_FB_EVENT_MOUSE_BUTTON_UP, e, NULL, NULL); 307 ecore_event_add(ECORE_FB_EVENT_MOUSE_BUTTON_UP, e, NULL, NULL);
291 } 308 }
292 if (did_triple) 309 if (did_triple)