[prev in list] [next in list] [prev in thread] [next in thread] 

List:       enlightenment-devel
Subject:    Re: [E-devel] EWL_embed: duplicated events
From:       Nathan Ingersoll <ningerso () gmail ! com>
Date:       2005-05-31 16:23:48
Message-ID: b057382e0505310923d32a483 () mail ! gmail ! com
[Download RAW message or body]

Oh, by splitting it up, I meant to take the specific portions that
belong to different engines and separating them, so that they can be
called in the realize callback for the windows and only register
events for the specific engine being used.

This patch will be just fine until someone gets around to doing a more
thorough check of the interactions to ensure that delayed event
registration will work. I'll run a couple tests and then get this into
CVS.

Thanks,
Nathan

On 5/31/05, Simon Poole <simon.armlinux@themalago.net> wrote:
> Nathan Ingersoll wrote:
> > Well that's a pain. I think the callback registration may need to be
> > moved to the ewl_window to avoid that situation. The idea is that the
> > FB event handlers are used when an EWL application has control of the
> > FB, and the evas object events are for when the EWL object is placed
> > on a pre-existing evas. If you want to fix this, I would split out the
> > ecore event handlers additions into a separate function that is called
> > by the window realize callback that sets a flag so it will only add
> > the event handlers once. If you don't have time I should be able to
> > fix this tonight.
> >
> 
> No need to split it out, as that is all that ewl_ev_init() does.  See
> what you think of the attached patch (against today's CVS).
> 
> I wasn't sure whether the handlers should be unregistered when the last
> window gets 'unrealized'.  I haven't done this, as ewl_shutdown()
> doesn't bother.
> 
> --
> Simon Poole
> www.appliancestudio.com
> 
> 
> diff -urN ewl-20050531.orig/src/lib/ewl_misc.c ewl-20050531/src/lib/ewl_misc.c
> --- ewl-20050531.orig/src/lib/ewl_misc.c        2005-05-27 05:48:12.000000000 +0100
> +++ ewl-20050531/src/lib/ewl_misc.c     2005-05-31 15:47:57.763391392 +0100
> @@ -159,12 +159,6 @@
>                 ewl_config.debug.level = debug_level;
>         }
> 
> -       if (!ewl_ev_init()) {
> -               DERROR("Could not init event data.\n");
> -               ewl_shutdown();
> -               DRETURN_INT(_ewl_init_count, DLEVEL_STABLE);
> -       }
> -
>         ewl_callbacks_init();
> 
>         if (!ewl_theme_init()) {
> diff -urN ewl-20050531.orig/src/lib/ewl_window.c ewl-20050531/src/lib/ewl_window.c
> --- ewl-20050531.orig/src/lib/ewl_window.c      2005-04-25 21:06:36.000000000 +0100
> +++ ewl-20050531/src/lib/ewl_window.c   2005-05-31 15:47:58.487281344 +0100
> @@ -24,6 +24,7 @@
>  #endif
> 
>  Ecore_List *ewl_window_list = NULL;
> +static int _ewl_window_realize_count = 0;
> 
>  /**
>   * @return Returns a new window on success, or NULL on failure.
> @@ -428,6 +429,12 @@
>         DENTER_FUNCTION(DLEVEL_STABLE);
>         DCHECK_PARAM_PTR("w", w);
> 
> +       if (++_ewl_window_realize_count == 1) {
> +               if (!ewl_ev_init()) {
> +                       DERROR("Could not init event data.\n");
> +               }
> +       }
> +
>         embed = EWL_EMBED(w);
>         window = EWL_WINDOW(w);
>         o = EWL_OBJECT(w);
> 
> 
>


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic