From 1745503b893095e3742549e2d74781d92c2c0dfd Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Fri, 1 Nov 2013 17:11:10 -0200 Subject: [PATCH] termio: do not handle selection if it doesn't exist. A typical case is when you try to force xdg-open on a media (instead of inline) by pressing "Control". This would trigger single-click box selection on mouse-down but on mouse up the mouse didn't move yet. By processing this as selection one also leaves the "didclick == EINA_TRUE" from mouse-down, leading the link to not be processed (_activate_link() wasn't called). PS: what an awful name is "didclick". --- src/bin/termio.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/bin/termio.c b/src/bin/termio.c index f70b3a77..422c9560 100644 --- a/src/bin/termio.c +++ b/src/bin/termio.c @@ -3078,6 +3078,14 @@ _smart_cb_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED if (sd->cur.makesel) { sd->cur.makesel = 0; + + if ((sd->cur.sel1.x == sd->cur.sel2.x) && + (sd->cur.sel2.y == sd->cur.sel2.y)) + { + _sel_set(data, EINA_FALSE); + sd->didclick = EINA_FALSE; + } + if (sd->cur.sel) { sd->didclick = EINA_TRUE;