forked from enlightenment/efl
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>
This commit is contained in:
parent
e5e6d8f1f2
commit
86aa034379
|
@ -406,6 +406,10 @@ _ecore_fb_li_device_fd_callback(void *data, Ecore_Fd_Handler *fdh EINA_UNUSED)
|
|||
dev = (Ecore_Fb_Input_Device*)data;
|
||||
/* read up to 64 events at once */
|
||||
len = read(dev->fd, &ev, sizeof(ev));
|
||||
if (len < 0) {
|
||||
dev->listen = EINA_FALSE;
|
||||
return EINA_FALSE;
|
||||
}
|
||||
for(i = 0; i < (int)(len / sizeof(ev[0])); i++)
|
||||
{
|
||||
switch(ev[i].type)
|
||||
|
|
Loading…
Reference in New Issue