raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=2f389423d56a7d2a857577ec2db6196b89436703

commit 2f389423d56a7d2a857577ec2db6196b89436703
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Wed Apr 2 18:06:02 2014 +0900

    fix x cursors broken by recent eo based fixes... to eolian changes
---
 src/lib/els_cursor.c | 42 +++++++++++++++++++++++++-----------------
 1 file changed, 25 insertions(+), 17 deletions(-)

diff --git a/src/lib/els_cursor.c b/src/lib/els_cursor.c
index cf6c5d4..a8d2a46 100644
--- a/src/lib/els_cursor.c
+++ b/src/lib/els_cursor.c
@@ -234,6 +234,8 @@ _elm_cursor_set(Elm_Cursor *cur)
                                      ELM_OBJECT_LAYER_CURSOR, cur->hot_x,
                                      cur->hot_y);
 #ifdef HAVE_ELEMENTARY_X
+        printf("A set %i\n", cur->x.cursor);
+        printf("A win = %x\n", cur->x.win);
         if (cur->x.win)
           ecore_x_window_cursor_set(cur->x.win, cur->x.cursor);
 #endif
@@ -339,30 +341,36 @@ _elm_cursor_cur_set(Elm_Cursor *cur)
         cur->use_engine = EINA_TRUE;
      }
 
-   if ((cur->use_engine) && (eo_isa(cur->eventarea, ELM_OBJ_WIN_CLASS)))
+   if (cur->use_engine)
      {
-#ifdef HAVE_ELEMENTARY_X
-        cur->x.win = elm_win_xwindow_get(cur->eventarea);
-        if (cur->x.win)
-          {
-             struct _Cursor_Id *cur_id;
-
-             cur_id = bsearch(&(cur->cursor_name), _cursors, _cursors_count,
-                              sizeof(struct _Cursor_Id), _elm_cursor_strcmp);
+        Evas_Object *top;
 
-             if (!cur_id)
+        top = elm_widget_top_get(cur->owner);
+        if ((top) && (eo_isa(top, ELM_OBJ_WIN_CLASS)))
+          {
+#ifdef HAVE_ELEMENTARY_X
+             cur->x.win = elm_win_xwindow_get(top);
+             if (cur->x.win)
                {
-                  INF("X cursor couldn't be found: %s. Using default.",
-                      cur->cursor_name);
-                  cur->x.cursor = ecore_x_cursor_shape_get(ECORE_X_CURSOR_X);
+                  struct _Cursor_Id *cur_id;
+                  
+                  cur_id = bsearch(&(cur->cursor_name), _cursors, 
_cursors_count,
+                                   sizeof(struct _Cursor_Id), 
_elm_cursor_strcmp);
+                  
+                  if (!cur_id)
+                    {
+                       INF("X cursor couldn't be found: %s. Using default.",
+                           cur->cursor_name);
+                       cur->x.cursor = 
ecore_x_cursor_shape_get(ECORE_X_CURSOR_X);
+                    }
+                  else
+                    cur->x.cursor = ecore_x_cursor_shape_get(cur_id->id);
                }
-             else
-                cur->x.cursor = ecore_x_cursor_shape_get(cur_id->id);
-          }
 #endif
 #ifdef HAVE_ELEMENTARY_WAYLAND
-        cur->wl.win = elm_win_wl_window_get(cur->eventarea);
+             cur->wl.win = elm_win_wl_window_get(top);
 #endif
+          }
      }
 }
 

-- 


Reply via email to