From 9766a725eb87c0f093fa95daa96541fbc0554e77 Mon Sep 17 00:00:00 2001 From: Sebastian Dransfeld Date: Mon, 19 Nov 2007 08:41:00 +0000 Subject: [PATCH] Check whether we have input devices (Thanks Lars Munch). SVN revision: 32770 --- .../ecore/src/lib/ecore_evas/ecore_evas_fb.c | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas_fb.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas_fb.c index a01539ba03..84986e0407 100644 --- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_fb.c +++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_fb.c @@ -1,3 +1,6 @@ +/* + * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 + */ #include "config.h" #include "Ecore.h" #include "ecore_private.h" @@ -74,12 +77,12 @@ _ecore_evas_fb_lose(void *data __UNUSED__) ee = (Ecore_Evas *)l; ee->visible = 0; } - ecore_list_first_goto(ecore_evas_input_devices); - dev = ecore_list_current(ecore_evas_input_devices); - do - { - ecore_fb_input_device_listen(dev, 0); - }while((dev = ecore_list_next(ecore_evas_input_devices))); + if (ecore_evas_input_devices) + { + ecore_list_first_goto(ecore_evas_input_devices); + while ((dev = ecore_list_next(ecore_evas_input_devices))) + ecore_fb_input_device_listen(dev, 0); + } } static void @@ -99,12 +102,12 @@ _ecore_evas_fb_gain(void *data __UNUSED__) else evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); } - ecore_list_first_goto(ecore_evas_input_devices); - dev = ecore_list_current(ecore_evas_input_devices); - do - { - ecore_fb_input_device_listen(dev, 1); - }while((dev = ecore_list_next(ecore_evas_input_devices))); + if (ecore_evas_input_devices) + { + ecore_list_first_goto(ecore_evas_input_devices); + while ((dev = ecore_list_next(ecore_evas_input_devices))) + ecore_fb_input_device_listen(dev, 0); + } } static int