This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch v-0.27
in repository enlightenment.

View the commit online.

commit 2a6876675ed1f8229137ab491ca8169750e915b9
Author: Carsten Haitzler <ras...@rasterman.com>
AuthorDate: Fri Jan 24 18:32:10 2025 +0000

    mixer - support new mixer ev reporting
    
    @feat
    
    fixes #44
---
 src/modules/mixer/e_mod_main.c | 38 +++++++++++++++++++++++---------------
 1 file changed, 23 insertions(+), 15 deletions(-)

diff --git a/src/modules/mixer/e_mod_main.c b/src/modules/mixer/e_mod_main.c
index 54155dd79..8cb970545 100644
--- a/src/modules/mixer/e_mod_main.c
+++ b/src/modules/mixer/e_mod_main.c
@@ -836,6 +836,28 @@ _mixer_key_down_cb(void *data EINA_UNUSED, Ecore_Event_Key *ev)
   return EINA_TRUE;
 }
 
+static Eina_Bool
+_wheel_cb(void *data EINA_UNUSED, Evas_Event_Mouse_Wheel *ev)
+{
+   if (backend_mute_get())
+     backend_mute_set(EINA_FALSE);
+
+   if (ev->z > 0)
+     backend_volume_decrease();
+   else if (ev->z < 0)
+     backend_volume_increase();
+   return EINA_TRUE;
+}
+
+static void
+_mouse_wheel_cb(void *data EINA_UNUSED, Evas *evas EINA_UNUSED,
+                Evas_Object *obj EINA_UNUSED, void *event)
+{
+   Evas_Event_Mouse_Wheel *ev = event;
+
+   _wheel_cb(data, ev);
+}
+
 static void
 _popup_new(Instance *inst)
 {
@@ -978,6 +1000,7 @@ _popup_new(Instance *inst)
    e_gadcon_popup_content_set(inst->popup, list);
    e_comp_object_util_autoclose(inst->popup->comp_object, _popup_comp_del_cb,
                                 _mixer_key_down_cb, inst);
+   e_comp_object_util_autoclose_wheel_cb_set(_wheel_cb);
    e_gadcon_popup_show(inst->popup);
    e_object_data_set(E_OBJECT(inst->popup), inst);
    E_OBJECT_DEL_SET(inst->popup, _popup_del_cb);
@@ -1052,21 +1075,6 @@ _mouse_down_cb(void *data, Evas *evas EINA_UNUSED,
      }
 }
 
-static void
-_mouse_wheel_cb(void *data EINA_UNUSED, Evas *evas EINA_UNUSED,
-                Evas_Object *obj EINA_UNUSED, void *event)
-{
-   Evas_Event_Mouse_Wheel *ev = event;
-
-   if (backend_mute_get())
-     backend_mute_set(EINA_FALSE);
-
-   if (ev->z > 0)
-     backend_volume_decrease();
-   else if (ev->z < 0)
-     backend_volume_increase();
-}
-
 /*
  * Gadcon functions
  */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to