diff options
Diffstat (limited to 'src/bin')
-rw-r--r-- | src/bin/e_config.c | 4 | ||||
-rw-r--r-- | src/bin/e_config.h | 2 | ||||
-rw-r--r-- | src/bin/e_gesture.c | 24 | ||||
-rw-r--r-- | src/bin/e_main.c | 11 |
4 files changed, 32 insertions, 9 deletions
diff --git a/src/bin/e_config.c b/src/bin/e_config.c index 8c15101f32..e7f091453f 100644 --- a/src/bin/e_config.c +++ b/src/bin/e_config.c @@ -879,6 +879,8 @@ _e_config_edd_init(Eina_Bool old) E_CONFIG_VAL(D, T, thumb_nice, INT); + E_CONFIG_VAL(D, T, gesture_open_input_devices, UCHAR); + E_CONFIG_VAL(D, T, menu_icons_hide, UCHAR); E_CONFIG_VAL(D, T, menu_favorites_show, INT); E_CONFIG_VAL(D, T, menu_apps_show, INT); @@ -1919,6 +1921,8 @@ e_config_load(void) E_CONFIG_LIMIT(e_config->desk_auto_switch, 0, 1); E_CONFIG_LIMIT(e_config->screen_limits, 0, 2); + E_CONFIG_LIMIT(e_config->thumb_nice, -20, 20); + E_CONFIG_LIMIT(e_config->gesture_open_input_devices, 0, 1); E_CONFIG_LIMIT(e_config->dpms_enable, 0, 1); E_CONFIG_LIMIT(e_config->dpms_standby_enable, 0, 1); diff --git a/src/bin/e_config.h b/src/bin/e_config.h index 1d287de1aa..bfef8486aa 100644 --- a/src/bin/e_config.h +++ b/src/bin/e_config.h @@ -291,6 +291,8 @@ struct _E_Config int thumb_nice; + unsigned char gesture_open_input_devices; // GUI + int ping_clients_interval; // GUI int thumbscroll_enable; // GUI diff --git a/src/bin/e_gesture.c b/src/bin/e_gesture.c index 9d2d48e247..07dbe11e35 100644 --- a/src/bin/e_gesture.c +++ b/src/bin/e_gesture.c @@ -22,6 +22,7 @@ typedef struct { static int gesture_capable_devices = 0; static E_Bindings_Swipe_Live_Update live_update; static void* live_update_data; +static Eina_List *handlers = NULL; static Swipe_Stats* _find_swipe_gesture_recognizition(Elput_Device *dev) @@ -250,10 +251,10 @@ e_gesture_init(void) active_gestures = eina_hash_pointer_new(_stats_free); - ecore_event_handler_add(ELPUT_EVENT_SWIPE_BEGIN, _swipe_cb, NULL); - ecore_event_handler_add(ELPUT_EVENT_SWIPE_UPDATE, _swipe_cb, NULL); - ecore_event_handler_add(ELPUT_EVENT_SWIPE_END, _swipe_cb, NULL); - ecore_event_handler_add(ELPUT_EVENT_SEAT_CAPS, _debug, NULL); + E_LIST_HANDLER_APPEND(handlers, ELPUT_EVENT_SWIPE_BEGIN, _swipe_cb, NULL); + E_LIST_HANDLER_APPEND(handlers, ELPUT_EVENT_SWIPE_UPDATE, _swipe_cb, NULL); + E_LIST_HANDLER_APPEND(handlers, ELPUT_EVENT_SWIPE_END, _swipe_cb, NULL); + E_LIST_HANDLER_APPEND(handlers, ELPUT_EVENT_SEAT_CAPS, _debug, NULL); return 1; } @@ -261,7 +262,20 @@ e_gesture_init(void) E_API int e_gesture_shutdown(void) { -// if (_detect_vm()) return 1; + Ecore_Event_Handler *hand; + + if (_detect_vm()) return 1; + + if (active_gestures) + { + eina_hash_free(active_gestures); + active_gestures = NULL; + } + + EINA_LIST_FREE(handlers, hand) + { + ecore_event_handler_del(hand); + } if (e_comp->comp_type == E_PIXMAP_TYPE_X) { diff --git a/src/bin/e_main.c b/src/bin/e_main.c index 926c68a83a..8ffe39c951 100644 --- a/src/bin/e_main.c +++ b/src/bin/e_main.c @@ -1059,10 +1059,13 @@ main(int argc, char **argv) e_comp_canvas_keys_grab(); TS("E_Comp_Canvas Keys Grab Done"); #ifdef HAVE_ELPUT - TS("E_Gesture Init"); - e_gesture_init(); - TS("E_Gesture Init Done"); - _e_main_shutdown_push(e_gesture_shutdown); + if (e_config->gesture_open_input_devices) + { + TS("E_Gesture Init"); + e_gesture_init(); + TS("E_Gesture Init Done"); + _e_main_shutdown_push(e_gesture_shutdown); + } #endif TS("Run Startup Apps"); |