[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [E-devel] Ewl_Menu in Ewl_Embed
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
I'll try to get to this tonight.
On 4/1/06, Peter Wehrfritz <firstname.lastname@example.org> 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:
> With the paramter:
> as the wrong type. (:widget::container::overlay::embed:) instead
> of (window).
> Please fix your program.
> IMO the problem lies in this function:
> ewl_menu_configure_cb(Ewl_Widget *w, void *ev_data __UNUSED__,
> void *user_data __UNUSED__)
> int x, y;
> Ewl_Menu *menu;
> Ewl_Embed *emb;
> 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);
> 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
> 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.
> 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!
> enlightenment-devel mailing list