On Tue, Jun 11, 2013 at 11:19 PM, Rafael Antognolli <antogno...@gmail.com>wrote:

> Hi,
>
> On Tue, Jun 11, 2013 at 9:54 AM, Daniel Juyung Seo <seojuyu...@gmail.com>
> wrote:
> > On Tue, Jun 11, 2013 at 9:42 PM, Leif Middelschulte <
> > leif.middelschu...@gmail.com> wrote:
> >
> >> Am Dienstag, 11. Juni 2013 schrieb Daniel Juyung Seo :
> >>
> >> > Hello, this follows elementary policy.
> >> >
> >> > 1. focused object A lose its focus when another object is going to get
> >> > focus.
> >> > 2. an object is focused when it's clicked.
> >> >
> >> > so the sequence is
> >> > 1. click object B
> >> > 2. focused object A lose its focus
> >> > 3. object B gets focus
> >> >
> >> > So only one object is focused at any point.
> >> >
> >> > It's not possible to unfocus other object before any other object is
> >> > clicked.
> >> > Because clicked signal will trigger unfocus signal.
> >>
> >> So, as I already imagined, it's due to the current implementation.
> >>
> >
> > Not just an implementation. It's a policy.
> >
> >
> >> Can't we trigger "unfocused" callbacks, before we trigger "clicked"
> >> callbacks? I assume that it's the way it is, because Edje understands
> >>
> >
> > How come?
> > I repeat.
> > 1. An object is focused when it's clicked.
> > 2. An object is unfocused when other object is going to be focused.
> >
> > It means mouse click -> unfocused -> focused.
>
> If I understood correctly, Leif is saying that this is not what is
> happening, and his test proves that (I didn't try it). He is saying
> that the current order is:
>
> mouse click -> focused -> unfocused
>
>
Well, if I understood correctly,
the current order is:
mouse click -> unfocused -> focused

but what he wants is:
unfocused -> mouse click -> focused

The reason why click event is called first is:
edje mouse up -> button mouse up
then
1. application mouse up (leif called this as "click")
2. widget's mouse up -> trigger focus handling -> call unfocused callback
-> call focused callback

Because the application mouse up callback was added later than widget's
mouse up callback, the application's callback is called first.
But as far as I learned, we should not depend on the callback sequence.

Anyhow, leif, if you really want to get your mouse up callback later than
other mouse up callback to the same object,
use evas_event_callback_priority_add() api and set the priority low
like EVAS_CALLBACK_PRIORITY_AFTER.
Then it will be :
unfocused -> focused -> mouse up(click)
But you still want:
unfocused -> mouse up(click) -> focused

I don't know how to do that.

Thanks.

Daniel Juyung Seo (SeoZ)



Regards,
> --
> Rafael Antognolli
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to