sachiel pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=974c8b05a4c97367b636593f5420ff01e8364aac

commit 974c8b05a4c97367b636593f5420ff01e8364aac
Author: Iván Briano <ivan.bri...@intel.com>
Date:   Mon Mar 31 14:50:53 2014 -0300

    Workaround broken popup on Terminology
    
    As the comment in the code explains, when ctxpopup is shown, it's giving
    focus to the inner list, which immediately decides to select the first
    of its items, calling, in the process, its selection callback. This has
    the very unfortunate, annoying and uselessly broken effect of making the
    popup never showing up, and instead triggering the first action in it.
    
    Since this behavior of "select first item on focus" seems to be the path
    taken in other places, I'm letting the people that know what they want
    to do about that figure out how to fix it properly.
---
 src/lib/elc_ctxpopup.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/lib/elc_ctxpopup.c b/src/lib/elc_ctxpopup.c
index 8962696..ef339a3 100644
--- a/src/lib/elc_ctxpopup.c
+++ b/src/lib/elc_ctxpopup.c
@@ -927,7 +927,16 @@ _on_show(void *data EINA_UNUSED,
      {
         elm_list_go(sd->list);
         sd->visible = EINA_TRUE;
-        elm_object_focus_set(sd->list, EINA_TRUE);
+        /*
+         * XXX: Giving focus to the list when it has nothing selected makes
+         * it select the first of its items, which makes the popup in
+         * Terminology never open and instead just trigger the first option.
+         * I'll let as an excercise to the reader to figure out why that
+         * is so fucking annoying. Extra points for noting why this is my
+         * choice of a "fix" instead of fixing the actual focus/select issue
+         * that seems to be spread all over Elementary.
+         */
+        //elm_object_focus_set(sd->list, EINA_TRUE);
         return;
      }
 

-- 


Reply via email to