git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@58666
7cbeb6ba-43b4-40fd-8cce-
4c39aea84d33
{
#ifdef HAVE_ELEMENTARY_X
Evas_Object *top = elm_widget_top_get(widget);
- Ecore_X_Window xwin = elm_win_xwindow_get(top);
+ Ecore_X_Window xwin;
Cnp_Selection *sel;
+ if (top) xwin = elm_win_xwindow_get(top);
+ else xwin = elm_win_xwindow_get(widget);
if (!xwin) return EINA_FALSE;
if ((unsigned int)selection >= (unsigned int)ELM_SEL_MAX) return EINA_FALSE;
if (!_elm_cnp_init_count) _elm_cnp_init();
const char *type;
if (!obj) return 0;
- type = evas_object_type_get(obj);
+ type = elm_widget_type_get(obj);
if (!type) return 0;
if (type != widtype) return _elm_ee_win_get(obj);
#ifdef HAVE_ELEMENTARY_X
win = elm_widget_data_get(obj);
if (!win) return xwin;
+ if (win->xwin) return win->xwin;
if (win->parent) return elm_win_xwindow_get(win->parent);
#endif
return xwin;