summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_fb/ecore_fb_ts.c
diff options
context:
space:
mode:
authorRafael Antognolli <antognolli@gmail.com>2011-11-23 16:52:14 +0000
committerRafael Antognolli <antognolli@gmail.com>2011-11-23 16:52:14 +0000
commit70060f434c25efb12bffb0c6ec98c1a572c8a6f0 (patch)
treee69305bc348db68c068a9c8cddaaaf85533b3518 /legacy/ecore/src/lib/ecore_fb/ecore_fb_ts.c
parentca2f7a8f775eb5d54345d785d13ec70cb0d8e029 (diff)
ecore/fb: Fix tslib input events.
With ecore_evas_input, every event must tell for which window it is intended. Patch for SiT. SVN revision: 65539
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_fb/ecore_fb_ts.c26
1 files changed, 26 insertions, 0 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 09c1cc45aa..395e76821a 100644
--- a/legacy/ecore/src/lib/ecore_fb/ecore_fb_ts.c
+++ b/legacy/ecore/src/lib/ecore_fb/ecore_fb_ts.c
@@ -74,6 +74,7 @@ struct ts_sample _ecore_fb_tslib_event;
74#endif 74#endif
75 75
76static double _ecore_fb_double_click_time = 0.25; 76static double _ecore_fb_double_click_time = 0.25;
77static void *_ecore_fb_ts_event_window = NULL;
77 78
78EAPI int 79EAPI int
79ecore_fb_ts_init(void) 80ecore_fb_ts_init(void)
@@ -131,6 +132,19 @@ ecore_fb_ts_shutdown(void)
131 if (_ecore_fb_ts_fd >= 0) close(_ecore_fb_ts_fd); 132 if (_ecore_fb_ts_fd >= 0) close(_ecore_fb_ts_fd);
132 _ecore_fb_ts_fd = -1; 133 _ecore_fb_ts_fd = -1;
133 _ecore_fb_ts_fd_handler_handle = NULL; 134 _ecore_fb_ts_fd_handler_handle = NULL;
135 _ecore_fb_ts_event_window = NULL;
136}
137
138EAPI void
139ecore_fb_ts_event_window_set(void *window)
140{
141 _ecore_fb_ts_event_window = window;
142}
143
144EAPI void *
145ecore_fb_ts_event_window_get(void)
146{
147 return _ecore_fb_ts_event_window;
134} 148}
135 149
136/** 150/**
@@ -259,6 +273,10 @@ _ecore_fb_ts_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __UN
259 e->y = y; 273 e->y = y;
260 e->root.x = x; 274 e->root.x = x;
261 e->root.y = y; 275 e->root.y = y;
276 e->window = (Ecore_Window)_ecore_fb_ts_event_window;
277 e->event_window = e->window;
278 e->root_window = e->window;
279 e->same_screen = 1;
262 ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL); 280 ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL);
263 } 281 }
264 if ((pressure) && (!prev_pressure)) 282 if ((pressure) && (!prev_pressure))
@@ -290,6 +308,10 @@ _ecore_fb_ts_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __UN
290 { 308 {
291 did_triple = 0; 309 did_triple = 0;
292 } 310 }
311 e->window = (Ecore_Window)_ecore_fb_ts_event_window;
312 e->event_window = e->window;
313 e->root_window = e->window;
314 e->same_screen = 1;
293 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, e, NULL, NULL); 315 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, e, NULL, NULL);
294 } 316 }
295 else if ((!pressure) && (prev_pressure)) 317 else if ((!pressure) && (prev_pressure))
@@ -306,6 +328,10 @@ _ecore_fb_ts_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __UN
306 e->double_click = 1; 328 e->double_click = 1;
307 if (did_triple) 329 if (did_triple)
308 e->triple_click = 1; 330 e->triple_click = 1;
331 e->window = (Ecore_Window)_ecore_fb_ts_event_window;
332 e->event_window = e->window;
333 e->root_window = e->window;
334 e->same_screen = 1;
309 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, e, NULL, NULL); 335 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, e, NULL, NULL);
310 } 336 }
311 if (did_triple) 337 if (did_triple)