summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-12-10 18:48:20 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-12-10 18:48:20 +0900
commit9da3c339ba86cf80d3c19507945a019a6c6a99ca (patch)
tree930014377a14feb9b9d058b2a0e37e4d6017e46f /src
parent98e503595702c4e03ac1c495659f7e84ed68dd3b (diff)
mixer - address duplicate bindings for the same action with timeout
use time logging to not allow actions within a small window of time from eachother. this fixes T620 - or should.
Diffstat (limited to 'src')
-rw-r--r--src/modules/mixer/e_mod_main.c10
-rw-r--r--src/modules/mixer/e_mod_main.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/modules/mixer/e_mod_main.c b/src/modules/mixer/e_mod_main.c
index 4f1cd05f6..48699585f 100644
--- a/src/modules/mixer/e_mod_main.c
+++ b/src/modules/mixer/e_mod_main.c
@@ -1098,6 +1098,11 @@ _mixer_cb_volume_modify(Eina_Bool up)
1098 if (!ctxt->default_instance) 1098 if (!ctxt->default_instance)
1099 return; 1099 return;
1100 1100
1101 if ((ecore_loop_time_get() - ctxt->last_act_time) < 0.04)
1102 return;
1103
1104 ctxt->last_act_time = ecore_loop_time_get();
1105
1101 if (ctxt->default_instance->conf->keybindings_popup) 1106 if (ctxt->default_instance->conf->keybindings_popup)
1102 _mixer_popup_timer_new(ctxt->default_instance); 1107 _mixer_popup_timer_new(ctxt->default_instance);
1103 _mixer_volume_change(ctxt->default_instance, up, EINA_TRUE); 1108 _mixer_volume_change(ctxt->default_instance, up, EINA_TRUE);
@@ -1130,6 +1135,11 @@ _mixer_cb_volume_mute(E_Object *obj __UNUSED__, const char *params __UNUSED__)
1130 if (!ctxt->default_instance) 1135 if (!ctxt->default_instance)
1131 return; 1136 return;
1132 1137
1138 if ((ecore_loop_time_get() - ctxt->last_act_time) < 0.1)
1139 return;
1140
1141 ctxt->last_act_time = ecore_loop_time_get();
1142
1133 if (ctxt->default_instance->conf->keybindings_popup) 1143 if (ctxt->default_instance->conf->keybindings_popup)
1134 _mixer_popup_timer_new(ctxt->default_instance); 1144 _mixer_popup_timer_new(ctxt->default_instance);
1135 _mixer_toggle_mute(ctxt->default_instance, EINA_TRUE); 1145 _mixer_toggle_mute(ctxt->default_instance, EINA_TRUE);
diff --git a/src/modules/mixer/e_mod_main.h b/src/modules/mixer/e_mod_main.h
index 659468072..d92633caa 100644
--- a/src/modules/mixer/e_mod_main.h
+++ b/src/modules/mixer/e_mod_main.h
@@ -69,6 +69,7 @@ typedef struct E_Mixer_Module_Context
69 E_Mixer_Instance *default_instance; 69 E_Mixer_Instance *default_instance;
70 Eina_List *instances; 70 Eina_List *instances;
71 E_Dialog *mixer_dialog; 71 E_Dialog *mixer_dialog;
72 double last_act_time;
72 struct st_mixer_actions 73 struct st_mixer_actions
73 { 74 {
74 E_Action *incr; 75 E_Action *incr;