summaryrefslogtreecommitdiff
path: root/src/lib/ecore_fb
diff options
context:
space:
mode:
authorOlivier Guiter <olivier.guiter@linux.intel.com>2014-06-30 16:32:36 +0200
committerGustavo Sverzut Barbieri <gustavo.barbieri@intel.com>2014-06-30 19:55:40 -0300
commit86aa034379113b92cb8cdbc7904c42ea87466c6f (patch)
treedf092262f291cb1786d50872c1d664466316cd1f /src/lib/ecore_fb
parente5e6d8f1f2824a469a9c0b88a322108218861fc9 (diff)
core_fb: Fix crash on tablet with removable kbd
On tablet with removable keyboard (e.g.: T100), as the FB support in ecore is very limited, the lib crashes when you remove the kbd. This patch disabled gracefully a "not anymore present" keyboard... Signed-off-by: Olivier Guiter <olivier.guiter@linux.intel.com>
Diffstat (limited to 'src/lib/ecore_fb')
-rw-r--r--src/lib/ecore_fb/ecore_fb_li.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/ecore_fb/ecore_fb_li.c b/src/lib/ecore_fb/ecore_fb_li.c
index f332959966..838576278a 100644
--- a/src/lib/ecore_fb/ecore_fb_li.c
+++ b/src/lib/ecore_fb/ecore_fb_li.c
@@ -406,6 +406,10 @@ _ecore_fb_li_device_fd_callback(void *data, Ecore_Fd_Handler *fdh EINA_UNUSED)
406 dev = (Ecore_Fb_Input_Device*)data; 406 dev = (Ecore_Fb_Input_Device*)data;
407 /* read up to 64 events at once */ 407 /* read up to 64 events at once */
408 len = read(dev->fd, &ev, sizeof(ev)); 408 len = read(dev->fd, &ev, sizeof(ev));
409 if (len < 0) {
410 dev->listen = EINA_FALSE;
411 return EINA_FALSE;
412 }
409 for(i = 0; i < (int)(len / sizeof(ev[0])); i++) 413 for(i = 0; i < (int)(len / sizeof(ev[0])); i++)
410 { 414 {
411 switch(ev[i].type) 415 switch(ev[i].type)