This is an automated email from the git hooks/post-receive script.
git pushed a commit to reference refs/pull/116/head
in repository enlightenment.
View the commit online.
commit 67b6e3b75be34b37a0039e3fdb0dced668b429ea
Author: Swagtoy <m...@ow.swag.toys>
AuthorDate: Tue Jun 24 23:16:34 2025 -0400
Ibar: Clicking with multiple clients toggles next client
---
src/modules/ibar/e_mod_main.c | 37 +++++++++++++++++++++++++++----------
1 file changed, 27 insertions(+), 10 deletions(-)
diff --git a/src/modules/ibar/e_mod_main.c b/src/modules/ibar/e_mod_main.c
index a348738e6..fbdf317e2 100644
--- a/src/modules/ibar/e_mod_main.c
+++ b/src/modules/ibar/e_mod_main.c
@@ -1707,16 +1707,13 @@ _ibar_cb_icon_reset(void *data)
return EINA_FALSE;
}
-static void
-_ibar_cb_icon_wheel(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
+static E_Client*
+_ibar_next_client(IBar_Icon *ic, unsigned dir)
{
- Evas_Event_Mouse_Wheel *ev = event_info;
E_Exec_Instance *exe;
- IBar_Icon *ic = data;
E_Client *cur, *sel = NULL;
Eina_List *l, *exe_current = NULL;
-
- if (!ic->exes) return;
+ if (!ic->exes) return NULL;
cur = e_client_focused_get();
cur = e_client_stack_bottom_get(cur);
@@ -1733,7 +1730,7 @@ _ibar_cb_icon_wheel(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSE
exe_current = ic->exes;
exe = eina_list_data_get(exe_current);
- if (ev->z < 0)
+ if (dir == 1)
{
if (cur && (cur->exe_inst == exe))
{
@@ -1747,7 +1744,7 @@ _ibar_cb_icon_wheel(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSE
exe_current = ic->exes;
}
}
- else if (ev->z > 0)
+ else if (dir == 0)
{
if (cur && (cur->exe_inst == exe))
{
@@ -1769,6 +1766,19 @@ _ibar_cb_icon_wheel(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSE
if (sel == cur)
sel = eina_list_data_get(eina_list_next(exe->clients));
}
+ return sel;
+}
+
+static void
+_ibar_cb_icon_wheel(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
+{
+ Evas_Event_Mouse_Wheel *ev = event_info;
+ E_Exec_Instance *exe;
+ IBar_Icon *ic = data;
+ E_Client *cur, *sel = NULL;
+ Eina_List *l, *exe_current = NULL;
+
+ sel = _ibar_next_client(data, ev->z < 0);
if (sel)
e_client_activate(sel, 1);
@@ -1809,9 +1819,16 @@ _ibar_icon_go(IBar_Icon *ic, Eina_Bool keep_going)
EINA_LIST_FOREACH(exe->clients, ll, ec)
{
count++;
- if (count > 1 && !ic->ibar->inst->ci->activate_click)
+ if (count > 1)
{
- ecore_job_add((Ecore_Cb)_ibar_cb_icon_menu_job_cb, ic);
+ if (ic->ibar->inst->ci->activate_click)
+ {
+ E_Client *client = _ibar_next_client(ic, 1);
+ if (client)
+ e_client_activate(client, 1);
+ }
+ else
+ ecore_job_add((Ecore_Cb)_ibar_cb_icon_menu_job_cb, ic);
return;
}
eclast = ec;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.