elementary: Use separate checks for pointer object vs pointer canvas
authorChris Michael <cp.michael@samsung.com>
Thu, 27 Oct 2016 17:13:32 +0000 (13:13 -0400)
committerChris Michael <cp.michael@samsung.com>
Fri, 28 Oct 2016 13:55:27 +0000 (09:55 -0400)
As under the drm engine a softcursor will be created, but not a
pointer canvas, we need to use separate if checks in certain places
like showing, hiding the mouse pointer/canvas.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/lib/elementary/efl_ui_win.c

index 5eaa9d0..06e652c 100644 (file)
@@ -2197,8 +2197,10 @@ _efl_ui_win_hide(Eo *obj, Efl_Ui_Win_Data *sd)
    if (sd->pointer.obj)
      {
         evas_object_hide(sd->pointer.obj);
-        ecore_evas_hide(sd->pointer.ee);
      }
+
+   if (sd->pointer.ee) ecore_evas_hide(sd->pointer.ee);
+
    if (_elm_config->atspi_mode)
      {
         Eo *root;
@@ -2672,11 +2674,8 @@ _efl_ui_win_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Win_Data *sd)
 #endif
 #ifdef HAVE_ELEMENTARY_WL2
    ecore_event_handler_del(sd->wl.configure_handler);
-   if (sd->pointer.obj)
-     {
-        evas_object_del(sd->pointer.obj);
-        ecore_evas_free(sd->pointer.ee);
-     }
+   if (sd->pointer.obj) evas_object_del(sd->pointer.obj);
+   if (sd->pointer.ee) ecore_evas_free(sd->pointer.ee);
 #endif
 
    if (sd->img_obj)
@@ -2756,11 +2755,9 @@ _elm_win_obj_intercept_show(void *data,
      {
         evas_object_show(sd->img_obj);
      }
-   if (sd->pointer.obj)
-     {
-        ecore_evas_show(sd->pointer.ee);
-        evas_object_show(sd->pointer.obj);
-     }
+   if (sd->pointer.obj) evas_object_show(sd->pointer.obj);
+   if (sd->pointer.ee) ecore_evas_show(sd->pointer.ee);
+
    evas_object_show(obj);
 #ifdef ELEMENTARY_X
    if (sd->type == ELM_WIN_TOOLTIP)