typedef struct _E_Desk_Smart_Data E_Desk_Smart_Data;
+typedef enum _E_Desk_Zoom_Animating_Type
+{
+ E_DESK_ZOOM_ANIMATING_TYPE_NONE,
+ E_DESK_ZOOM_ANIMATING_TYPE_ENABLE,
+ E_DESK_ZOOM_ANIMATING_TYPE_DISABLE,
+} E_Desk_Zoom_Animating_Type;
+
struct _E_Desk_Smart_Data
{
Evas_Object_Smart_Clipped_Data base;
int prev_cord_x, prev_cord_y;
Eina_Bool enabled;
Ecore_Animator *animator;
+ E_Desk_Zoom_Animating_Type animating_type;
} zoom;
};
}
static Eina_Bool
-_animator_cb(void *data, double pos)
+_e_desk_zoom_animate_cb(void *data, double pos)
{
E_Desk *desk;
E_Client *ec;
_e_desk_util_comp_hwc_disable_set(EINA_FALSE);
}
+ sd->zoom.animating_type = E_DESK_ZOOM_ANIMATING_TYPE_NONE;
sd->zoom.animator = NULL;
}
sd->zoom.animator = NULL;
}
+ sd->zoom.animating_type = E_DESK_ZOOM_ANIMATING_TYPE_ENABLE;
sd->zoom.animator = ecore_animator_timeline_add(e_config->desk_zoom_effect.duration,
- _animator_cb, desk);
+ _e_desk_zoom_animate_cb, desk);
_e_desk_object_zoom(desk->smart_obj, zoomx, zoomy, cx, cy);
}
else
E_DESK_SMART_DATA_GET_OR_RETURN(desk->smart_obj, sd);
if (!sd->zoom.enabled)
- goto end;
+ {
+ if (sd->zoom.animating_type != E_DESK_ZOOM_ANIMATING_TYPE_ENABLE)
+ {
+ goto end;
+ }
+ }
sd->zoom.prev_ratio_x = sd->zoom.ratio_x;
sd->zoom.prev_ratio_y = sd->zoom.ratio_y;
sd->zoom.animator = NULL;
}
+ sd->zoom.animating_type = E_DESK_ZOOM_ANIMATING_TYPE_DISABLE;
sd->zoom.animator = ecore_animator_timeline_add(e_config->desk_zoom_effect.duration,
- _animator_cb, desk);
+ _e_desk_zoom_animate_cb, desk);
_e_desk_object_zoom(desk->smart_obj, sd->zoom.ratio_x, sd->zoom.ratio_y,
sd->zoom.cord_x, sd->zoom.cord_y);
}