elementary: oops revert.
[framework/uifw/elementary.git] / src / lib / elm_win.c
index 1f532a8..37ae0a0 100644 (file)
@@ -38,6 +38,7 @@ struct _Elm_Win
         Ecore_Evas *ee;
         Evas *evas;
         Evas_Object *obj, *hot_obj;
+        int hot_x, hot_y;
      } pointer;
    struct {
       Evas_Object *top;
@@ -336,7 +337,7 @@ _elm_win_focus_in(Ecore_Evas *ee)
    win = elm_widget_data_get(obj);
    if (!win) return;
    _elm_widget_top_win_focused_set(win->win_obj, EINA_TRUE);
-   if (win->show_count == 1)
+   if (!elm_widget_focus_order_get(obj))
      {
         elm_widget_focus_steal(win->win_obj);
         win->show_count++;
@@ -633,6 +634,7 @@ _elm_win_obj_intercept_show(void *data, Evas_Object *obj)
      {
         ecore_evas_show(win->pointer.ee);
         evas_object_show(win->pointer.obj);
+        ecore_evas_wayland_pointer_set(win->pointer.ee, 10, 10);
      }
    evas_object_show(obj);
 }
@@ -1556,7 +1558,7 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
          if (win->ee)                                                   \
             elm_engine_set(ecore_evas_engine_name_get(win->ee));        \
    } while (0)
-#define ENGINE_COMPARE(name) (!strcmp(_elm_config->engine, name))
+#define ENGINE_COMPARE(name) (_elm_config->engine && !strcmp(_elm_config->engine, name))
 
    switch (type)
      {
@@ -1702,7 +1704,7 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
         else if (ENGINE_COMPARE(ELM_WAYLAND_SHM)) 
           {
              win->ee = ecore_evas_wayland_shm_new(NULL, 0, 0, 1, 1, 0);
-             win->evas = ecore_evas_get(win->ee);
+            win->evas = ecore_evas_get(win->ee);
 
              _elm_win_frame_add(win, "default");
              _elm_win_pointer_add(win, "default");
@@ -1710,7 +1712,7 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
         else if (ENGINE_COMPARE(ELM_WAYLAND_EGL)) 
           {
              win->ee = ecore_evas_wayland_egl_new(NULL, 0, 0, 1, 1, 0);
-             win->evas = ecore_evas_get(win->ee);
+            win->evas = ecore_evas_get(win->ee);
 
              _elm_win_frame_add(win, "default");
              _elm_win_pointer_add(win, "default");
@@ -1906,7 +1908,7 @@ elm_win_title_set(Evas_Object *obj, const char *title)
    Elm_Win *win;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
-   if (!win) return;
+   if (!win || !title) return;
    ecore_evas_title_set(win->ee, title);
    if (win->frame_obj)
      edje_object_part_text_set(win->frame_obj, "elm.text.title", title);