aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2014-02-20 20:10:12 -0300
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2014-02-20 20:12:22 -0300
commit9804bba5037868a6819a7ac1d6b29e0d6ac1e99a (patch)
treeee5506335f10b88f326860ea6daa31f46cbf0810
parentEmotion Generic: receiving the size on opening is correct. (diff)
downloadefl-9804bba5037868a6819a7ac1d6b29e0d6ac1e99a.tar.gz
ecore_evas_fb: allow to force tslib even if mouse was handled.
sometimes a device may have a mouse connected but the primary use is via touchscreen, then we force ecore_fb_ts_init() with ECORE_EVAS_FB_TS_ALWAYS=1
-rw-r--r--src/modules/ecore_evas/engines/fb/ecore_evas_fb.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c b/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c
index 9d999e228c..aba3127ab5 100644
--- a/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c
+++ b/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c
@@ -184,7 +184,8 @@ _ecore_evas_fb_init(Ecore_Evas *ee, int w, int h)
Eina_Iterator *ls;
Ecore_Fb_Input_Device *device;
Ecore_Fb_Input_Device_Cap caps;
- int mouse_handled = 0;
+ int mouse_handled = 0, always_ts;
+ const char *s;
_ecore_evas_init_count++;
if (_ecore_evas_init_count > 1) return _ecore_evas_init_count;
@@ -233,7 +234,11 @@ _ecore_evas_fb_init(Ecore_Evas *ee, int w, int h)
}
eina_iterator_free(ls);
- if (!mouse_handled)
+ /* force to check for touchscreen via tslib even if mouse was detected */
+ s = getenv("ECORE_EVAS_FB_TS_ALWAYS");
+ always_ts = s ? atoi(s) : 0;
+
+ if ((!mouse_handled) || (always_ts))
{
if (ecore_fb_ts_init())
{