copy from inlined wins works. copy to.. doesn't.
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 14 Apr 2011 13:51:12 +0000 (13:51 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 14 Apr 2011 13:51:12 +0000 (13:51 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@58666 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_cnp_helper.c
src/lib/elm_win.c

index 3c3a9bf..664685a 100644 (file)
@@ -411,9 +411,11 @@ elm_selection_set(Elm_Sel_Type selection, Evas_Object *widget, Elm_Sel_Format fo
 {
 #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();
index 4b459c9..37d3fdf 100644 (file)
@@ -2918,12 +2918,13 @@ elm_win_xwindow_get(const Evas_Object *obj)
    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;