This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch ibar-onclick-toggle
in repository enlightenment.
View the commit online.
commit 3878576801e265d4052813ac0a591e8f4befd946
Author: Swagtoy <m...@ow.swag.toys>
AuthorDate: Tue Jun 24 23:32:11 2025 -0400
ibar: Middle click to launch with activate_click set
---
src/modules/ibar/e_mod_main.c | 32 +++++++++++++++-----------------
1 file changed, 15 insertions(+), 17 deletions(-)
diff --git a/src/modules/ibar/e_mod_main.c b/src/modules/ibar/e_mod_main.c
index fbdf317e2..eb414000c 100644
--- a/src/modules/ibar/e_mod_main.c
+++ b/src/modules/ibar/e_mod_main.c
@@ -1577,7 +1577,7 @@ _ibar_cb_icon_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
ev = event_info;
ic = data;
- if (ev->button == 1)
+ if (ev->button == 1 || (ic->ibar->inst->ci->activate_click && ev->button == 2))
{
ic->drag.x = ev->output.x;
ic->drag.y = ev->output.y;
@@ -1773,12 +1773,7 @@ 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);
+ E_Client *sel = _ibar_next_client(data, ev->z < 0);
if (sel)
e_client_activate(sel, 1);
@@ -1805,9 +1800,9 @@ _ibar_instance_watch(void *data, E_Exec_Instance *inst, E_Exec_Watch_Type type)
}
static void
-_ibar_icon_go(IBar_Icon *ic, Eina_Bool keep_going)
+_ibar_icon_go(IBar_Icon *ic, Eina_Bool keep_going, Eina_Bool force_open)
{
- if (ic->not_in_order || ic->ibar->inst->ci->activate_click)
+ if ((ic->not_in_order || ic->ibar->inst->ci->activate_click) && !force_open)
{
Eina_List *l, *ll;
E_Exec_Instance *exe;
@@ -1836,12 +1831,12 @@ _ibar_icon_go(IBar_Icon *ic, Eina_Bool keep_going)
}
if (eclast)
{
- if (e_client_focused_get() == eclast)
- e_client_iconify(eclast);
- else
- e_client_activate(eclast, 1);
+ if (e_client_focused_get() == eclast)
+ e_client_iconify(eclast);
+ else
+ e_client_activate(eclast, 1);
}
- if (! ic->ibar->inst->ci->activate_click || eclast)
+ if (!ic->ibar->inst->ci->activate_click || eclast)
return;
}
if (ic->app->type == EFREET_DESKTOP_TYPE_APPLICATION)
@@ -1884,13 +1879,16 @@ _ibar_cb_icon_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN
{
Evas_Event_Mouse_Up *ev;
IBar_Icon *ic;
+ Eina_Bool activate_click_launch;
ev = event_info;
ic = data;
+
+ activate_click_launch = (ic->ibar->inst->ci->activate_click && ev->button == 2);
- if ((ev->button == 1) && (ic->mouse_down == 1))
+ if ((ev->button == 1 || activate_click_launch) && (ic->mouse_down == 1))
{
- if (!ic->drag.dnd) _ibar_icon_go(ic, EINA_FALSE);
+ if (!ic->drag.dnd) _ibar_icon_go(ic, EINA_FALSE, activate_click_launch);
ic->drag.start = 0;
ic->drag.dnd = 0;
ic->mouse_down = 0;
@@ -2480,7 +2478,7 @@ _ibar_focus_launch(IBar *b)
{
if (ic->focused)
{
- _ibar_icon_go(ic, EINA_TRUE);
+ _ibar_icon_go(ic, EINA_TRUE, EINA_FALSE);
break;
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.