summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_fb/ecore_fb_ts.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-03-29 05:57:41 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-03-29 05:57:41 +0000
commitf62daabcb98ece183ca6d63cd9a27eb163c2bb8c (patch)
tree0ec7bb9fd35945d7a09ca5f72016cdaf754f93a6 /legacy/ecore/src/lib/ecore_fb/ecore_fb_ts.c
parent31ee93cf636a0bf9f72c55a67fe2181c6325c7dd (diff)
* Fix range of issues with ecore_fb and even ecore_evas where
it didn't work right on the fb. (timestamps wrong, focus handling etc.). This makes it work fully again. SVN revision: 69715
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_fb/ecore_fb_ts.c19
1 files changed, 13 insertions, 6 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 395e76821a..a33bb36dda 100644
--- a/legacy/ecore/src/lib/ecore_fb/ecore_fb_ts.c
+++ b/legacy/ecore/src/lib/ecore_fb/ecore_fb_ts.c
@@ -238,7 +238,6 @@ _ecore_fb_ts_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __UN
238 y = _ecore_fb_tslib_event.y; 238 y = _ecore_fb_tslib_event.y;
239 pressure = _ecore_fb_tslib_event.pressure; 239 pressure = _ecore_fb_tslib_event.pressure;
240 v = 1; /* loop, there might be more samples */ 240 v = 1; /* loop, there might be more samples */
241 t = ecore_time_get();
242#else 241#else
243 ptr = (char *)&(_ecore_fb_ts_event); 242 ptr = (char *)&(_ecore_fb_ts_event);
244 ptr += _ecore_fb_ts_event_byte_count; 243 ptr += _ecore_fb_ts_event_byte_count;
@@ -260,6 +259,7 @@ _ecore_fb_ts_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __UN
260 } 259 }
261 pressure = _ecore_fb_ts_event.pressure; 260 pressure = _ecore_fb_ts_event.pressure;
262#endif 261#endif
262 t = ecore_loop_time_get();
263 /* add event to queue */ 263 /* add event to queue */
264 /* always add a move event */ 264 /* always add a move event */
265 if ((pressure) || (prev_pressure)) 265 if ((pressure) || (prev_pressure))
@@ -271,12 +271,13 @@ _ecore_fb_ts_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __UN
271 if (!e) goto retry; 271 if (!e) goto retry;
272 e->x = x; 272 e->x = x;
273 e->y = y; 273 e->y = y;
274 e->root.x = x; 274 e->root.x = e->x;
275 e->root.y = y; 275 e->root.y = e->y;
276 e->window = (Ecore_Window)_ecore_fb_ts_event_window; 276 e->window = 1;
277 e->event_window = e->window; 277 e->event_window = e->window;
278 e->root_window = e->window; 278 e->root_window = e->window;
279 e->same_screen = 1; 279 e->same_screen = 1;
280 e->timestamp = ecore_loop_time_get() * 1000.0;
280 ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL); 281 ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL);
281 } 282 }
282 if ((pressure) && (!prev_pressure)) 283 if ((pressure) && (!prev_pressure))
@@ -288,6 +289,8 @@ _ecore_fb_ts_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __UN
288 if (!e) goto retry; 289 if (!e) goto retry;
289 e->x = x; 290 e->x = x;
290 e->y = y; 291 e->y = y;
292 e->root.x = e->x;
293 e->root.y = e->y;
291 e->buttons = 1; 294 e->buttons = 1;
292 if ((t - last_time) <= _ecore_fb_double_click_time) 295 if ((t - last_time) <= _ecore_fb_double_click_time)
293 { 296 {
@@ -308,10 +311,11 @@ _ecore_fb_ts_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __UN
308 { 311 {
309 did_triple = 0; 312 did_triple = 0;
310 } 313 }
311 e->window = (Ecore_Window)_ecore_fb_ts_event_window; 314 e->window = 1;
312 e->event_window = e->window; 315 e->event_window = e->window;
313 e->root_window = e->window; 316 e->root_window = e->window;
314 e->same_screen = 1; 317 e->same_screen = 1;
318 e->timestamp = ecore_loop_time_get() * 1000.0;
315 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, e, NULL, NULL); 319 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, e, NULL, NULL);
316 } 320 }
317 else if ((!pressure) && (prev_pressure)) 321 else if ((!pressure) && (prev_pressure))
@@ -323,15 +327,18 @@ _ecore_fb_ts_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __UN
323 if (!e) goto retry; 327 if (!e) goto retry;
324 e->x = prev_x; 328 e->x = prev_x;
325 e->y = prev_y; 329 e->y = prev_y;
330 e->root.x = e->x;
331 e->root.y = e->y;
326 e->buttons = 1; 332 e->buttons = 1;
327 if (did_double) 333 if (did_double)
328 e->double_click = 1; 334 e->double_click = 1;
329 if (did_triple) 335 if (did_triple)
330 e->triple_click = 1; 336 e->triple_click = 1;
331 e->window = (Ecore_Window)_ecore_fb_ts_event_window; 337 e->window = 1;
332 e->event_window = e->window; 338 e->event_window = e->window;
333 e->root_window = e->window; 339 e->root_window = e->window;
334 e->same_screen = 1; 340 e->same_screen = 1;
341 e->timestamp = ecore_loop_time_get() * 1000.0;
335 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, e, NULL, NULL); 342 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, e, NULL, NULL);
336 } 343 }
337 if (did_triple) 344 if (did_triple)