Good catch on the mem leaks. Which events are you referring to here,
the Ecore_X events or the EWL internal events?

Thanks,
Nathan

On 12/18/06, Enlightenment CVS <[EMAIL PROTECTED]> wrote:
> Enlightenment CVS committal
>
> Author  : englebass
> Project : e17
> Module  : libs/ewl
>
> Dir     : e17/libs/ewl/src/engines/x11
>
>
> Modified Files:
>         ewl_engine_x11.c
>
>
> Log Message:
> Result from XGetAtomName must be free'd. But shouldn't the event rather
> contain names than atoms?
>
> ===================================================================
> RCS file: /cvs/e/e17/libs/ewl/src/engines/x11/ewl_engine_x11.c,v
> retrieving revision 1.32
> retrieving revision 1.33
> diff -u -3 -r1.32 -r1.33
> --- ewl_engine_x11.c    13 Dec 2006 19:47:55 -0000      1.32
> +++ ewl_engine_x11.c    18 Dec 2006 07:05:56 -0000      1.33
> @@ -1,5 +1,6 @@
>  #include <Ewl_Engine_X11.h>
>  #include <Ewl.h>
> +#include <X11/Xlib.h>
>  #include "ewl_private.h"
>  #include "ewl_macros.h"
>  #include "ewl_debug.h"
> @@ -1262,19 +1263,25 @@
>
>         /* Handle everything *except* XDND selection */
>         if (ev->selection != ECORE_X_ATOM_SELECTION_XDND)
> -               printf("Data request event received: %s not %s\n",
> -                               XGetAtomName(ecore_x_display_get(),
> -                                       ev->selection),
> -                               XGetAtomName(ecore_x_display_get(),
> -                                       ECORE_X_ATOM_SELECTION_XDND));
> +       {
> +               char *rec, *dnd;
> +
> +               rec = XGetAtomName(ecore_x_display_get(), ev->selection);
> +               dnd = XGetAtomName(ecore_x_display_get(), 
> ECORE_X_ATOM_SELECTION_XDND);
> +               printf("Data request event received: %s not %s\n", rec, dnd);
> +               XFree(rec);
> +               XFree(dnd);
> +       }
>
>         else if (ev->selection == ECORE_X_ATOM_SELECTION_XDND)
>         {
>                 Ewl_Embed *embed;
> +               char *atom;
> +
>                 embed = ewl_embed_evas_window_find((void *)ev->owner);
> -               ewl_embed_dnd_data_request_feed(embed, ev,
> -                               XGetAtomName(ecore_x_display_get(),
> -                                       ev->target));
> +               atom = XGetAtomName(ecore_x_display_get(), ev->target);
> +               ewl_embed_dnd_data_request_feed(embed, ev, atom);
> +               XFree(atom);
>         }
>
>         DRETURN_INT(TRUE, DLEVEL_STABLE);
>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> enlightenment-cvs mailing list
> enlightenment-cvs@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to