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.
This commit is contained in:
Iván Briano 2014-03-31 14:50:53 -03:00
parent 2f3f5b31cd
commit 02590f4877
1 changed files with 10 additions and 1 deletions

View File

@ -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;
}