raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5db6b051871273dbe600155f73f130cea433fac1

commit 5db6b051871273dbe600155f73f130cea433fac1
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Tue Feb 13 15:21:49 2018 +0900

    elm - dont get top widget for non-ui objects
---
 src/lib/elementary/efl_selection.c | 17 ++++++++++-------
 src/lib/elementary/efl_ui_dnd.c    |  3 ++-
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/src/lib/elementary/efl_selection.c 
b/src/lib/elementary/efl_selection.c
index 0bf9303969..a97251a365 100644
--- a/src/lib/elementary/efl_selection.c
+++ b/src/lib/elementary/efl_selection.c
@@ -115,15 +115,18 @@ _wl_default_seat_id_get(Evas_Object *obj)
 
    if (obj)
      {
-        Eo *top = elm_widget_top_get(obj);
-        if (efl_isa(top, EFL_UI_WIN_INLINED_CLASS))
+        if (efl_isa(obj, EFL_UI_WIDGET_CLASS))
           {
-             parent2 = efl_ui_win_inlined_parent_get(top);
-             if (parent2) obj = elm_widget_top_get(parent2) ?: parent2;
+             Eo *top = elm_widget_top_get(obj);
+             if (efl_isa(top, EFL_UI_WIN_INLINED_CLASS))
+               {
+                  parent2 = efl_ui_win_inlined_parent_get(top);
+                  if (parent2) obj = elm_widget_top_get(parent2) ?: parent2;
+               }
+             /* fake win means canvas seat id will not match protocol seat id 
*/
+             ewin = elm_win_get(obj);
+             if (elm_win_type_get(ewin) == ELM_WIN_FAKE) obj = NULL;
           }
-        /* fake win means canvas seat id will not match protocol seat id */
-        ewin = elm_win_get(obj);
-        if (elm_win_type_get(ewin) == ELM_WIN_FAKE) obj = NULL;
      }
 
    if (!obj)
diff --git a/src/lib/elementary/efl_ui_dnd.c b/src/lib/elementary/efl_ui_dnd.c
index a05bf61c7d..d0a1df79ee 100644
--- a/src/lib/elementary/efl_ui_dnd.c
+++ b/src/lib/elementary/efl_ui_dnd.c
@@ -21,9 +21,10 @@ struct _Efl_Ui_Dnd_Container_Data
 
 extern int _wl_default_seat_id_get(Evas_Object *obj);
 
-static inline Eo*
+static inline Eo *
 _selection_manager_get(Eo *obj)
 {
+   if (!efl_isa(obj, EFL_UI_WIDGET_CLASS)) return NULL;
    Eo *top = elm_widget_top_get(obj);
    if (!top)
      {

-- 


Reply via email to