aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-09-14 10:20:56 +0200
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-09-14 10:20:56 +0200
commitb091ab559e5a6796cb042b70f6db7f8a9dcdc23f (patch)
tree00bf522612fe555d236cf94f6216dba4b2af2243
parentibar: multiply size with scale (diff)
downloadenlightenment-devs/bu5hm4n/mixer_fix.tar.gz
mixer: lock up the slider for the case a drag is in progressdevs/bu5hm4n/mixer_fix
-rw-r--r--src/modules/mixer/e_mod_main.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/modules/mixer/e_mod_main.c b/src/modules/mixer/e_mod_main.c
index db7a1d76f..970c1abf3 100644
--- a/src/modules/mixer/e_mod_main.c
+++ b/src/modules/mixer/e_mod_main.c
@@ -127,7 +127,8 @@ static void
_mixer_popup_update(Instance *inst, int mute, int vol)
{
elm_check_state_set(inst->check, !!mute);
- elm_slider_value_set(inst->slider, vol);
+ if (!evas_object_data_del(inst->slider, "__lock"))
+ elm_slider_value_set(inst->slider, vol);
}
static void _popup_del(Instance *inst);
@@ -399,6 +400,14 @@ _slider_drag_stop_cb(void *data EINA_UNUSED, Evas_Object *obj,
Emix_Sink *s = (Emix_Sink *)mixer_context->sink_default;
int val = s->volume.volumes[0];
elm_slider_value_set(obj, val);
+ evas_object_data_del(obj, "__lock");
+}
+
+static void
+_slider_drag_start_cb(void *data EINA_UNUSED, Evas_Object *obj,
+ void *event EINA_UNUSED)
+{
+ evas_object_data_set(obj, "__lock", (void*)1);
}
static void
@@ -466,6 +475,7 @@ _popup_new(Instance *inst)
elm_slider_min_max_set(slider, 0.0, emix_max_volume_get());
evas_object_smart_callback_add(slider, "changed", _slider_changed_cb, NULL);
evas_object_smart_callback_add(slider, "slider,drag,stop", _slider_drag_stop_cb, NULL);
+ evas_object_smart_callback_add(slider, "slider,drag,start", _slider_drag_start_cb, NULL);
elm_slider_value_set(slider, volume);
elm_box_pack_end(bx, slider);
evas_object_show(slider);