Thanks for the information Peter. That line would definitely cause
that warning to be printed. Looks like we need to register an ecore_x
callback for the configure event on the embed and store the window
position information.
I'll try to get to this tonight.
Thanks again,
Nathan
On 4/1/06, Peter Wehrfritz <[EMAIL PROTECTED]> wrote:
> Hi ewl-devs,
>
> Some days ago I started with the rewrite of the elitaire context menu. I
> use a smilar approach like the Ewl_Iconbox - a floater holding the
> Ewl_Menu. This works well in an Ewl_Window, but when I use it in an
> Ewl_Embed as I was planing it, because the main elitaire window isn't a
> Ewl_Window, it causes error messages and doesn't work correctly:
>
> ***** Ewl Developer Warning ***** :
> To find where this is occurring set a breakpoint
> for the function ewl_print_warning.
> This program is calling:
>
> ewl_window_position_get();
>
> With the paramter:
>
> win
>
> as the wrong type. (:widget::container::overlay::embed:) instead
> of (window).
> Please fix your program.
>
> IMO the problem lies in this function:
>
> void
> ewl_menu_configure_cb(Ewl_Widget *w, void *ev_data __UNUSED__,
> void *user_data __UNUSED__)
> {
> int x, y;
> Ewl_Menu *menu;
> Ewl_Embed *emb;
>
> DENTER_FUNCTION(DLEVEL_STABLE);
> DCHECK_PARAM_PTR("w", w);
> DCHECK_TYPE("w", w, EWL_WIDGET_TYPE);
>
> menu = EWL_MENU(w);
> emb = ewl_embed_widget_find(w);
>
> ewl_window_position_get(EWL_WINDOW(emb), &x, &y); // <---- HERE
> menu->popup_x = x + CURRENT_X(w);
> menu->popup_y = y + CURRENT_Y(w);
>
> ewl_menu_popup_move_cb(menu->base.popup, NULL, w);
>
> DLEAVE_FUNCTION(DLEVEL_STABLE);
> }
>
> So in my case the emb isn't also an Ewl_Window, but just an Ewl_Embed.
>
> Perhaps it is possible to move the ewl_window_position_get() to
> ewl_embed_position_get()
> and return the evas position plus the evas_object position (this should
> be 0 , 0 in case of Ewl_Window). But I havent looked deep enough into
> the code to see if this would work or not.
>
> thanks
>
> peter
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel