}
static void
+_e_client_transform_core_vertices_apply_with_zoom(E_Client *ec EINA_UNUSED,
+ Evas_Object *obj,
+ E_Util_Transform_Rect_Vertex *vertices,
+ E_Util_Transform *transform,
+ double zoomx, double zoomy,
+ Evas_Coord cx, Evas_Coord cy)
+{
+ Evas_Map *map = NULL;
+
+ if (!obj) return;
+
+ if (vertices)
+ {
+ map = _e_client_transform_core_map_new(obj, vertices, transform);
+ EINA_SAFETY_ON_NULL_RETURN(map);
+
+ evas_map_util_zoom(map, zoomx, zoomy, cx, cy);
+
+ evas_object_map_set(obj, map);
+ evas_object_map_enable_set(obj, EINA_TRUE);
+
+ evas_map_free(map);
+ }
+ else
+ evas_object_map_enable_set(obj, EINA_FALSE);
+}
+
+static void
_e_client_transform_core_vertices_apply(E_Client *ec EINA_UNUSED,
Evas_Object *obj,
E_Util_Transform_Rect_Vertex *vertices,
}
static void
+_e_client_transform_core_sub_update_with_zoom(E_Client *ec, E_Util_Transform_Rect_Vertex *vertices, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy)
+{
+ E_Comp_Wl_Client_Data *cdata;
+
+ if (!ec) return;
+ if (!ec->comp_data) return;
+
+ cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
+
+ if (cdata->sub.below_obj)
+ _e_client_transform_core_vertices_apply_with_zoom(ec, cdata->sub.below_obj, vertices, NULL, zoomx, zoomy, cx, cy);
+}
+
+static void
_e_client_cb_hook_shell_surface_ready(void *data EINA_UNUSED, E_Client *ec)
{
if (EINA_UNLIKELY(!ec))
x, y, out_x, out_y);
}
+static void
+_e_client_transform_core_update_with_zoom(E_Client *ec, double zoomx, double zoomy, int cx, int cy)
+{
+ if (!ec) return;
+
+ e_comp_object_transform_transp_vertices_set_with_zoom(ec->frame, &ec->transform_core.result.vertices,
+ zoomx, zoomy, cx, cy);
+ e_comp_object_transform_bg_vertices_set_with_zoom(ec->frame, &ec->transform_core.result.boundary.vertices,
+ zoomx, zoomy, cx, cy);
+ _e_client_transform_core_vertices_apply_with_zoom(ec, ec->frame, &ec->transform_core.result.vertices, &ec->transform_core.result.transform,
+ zoomx, zoomy, cx, cy);
+ _e_client_transform_core_sub_update_with_zoom(ec, &ec->transform_core.result.vertices,
+ zoomx, zoomy, cx, cy);
+}
+
+EINTERN void
+e_client_transform_core_update_with_desk_zoom(E_Client *ec)
+{
+ E_Desk *desk;
+ double zoomx, zoomy;
+ Evas_Coord cx, cy;
+ Eina_Bool ret;
+ Eina_Bool enable;
+
+ if (!ec) return;
+ if (ec->new_client) return;
+
+ desk = ec->desk;
+ if (!desk) return;
+
+ ret = e_desk_zoom_get(desk, &zoomx, &zoomy, &cx, &cy);
+ if (!ret) return;
+
+ enable = e_client_transform_core_enable_get(ec);
+ if (enable)
+ _e_client_transform_core_update_with_zoom(ec, zoomx, zoomy, cx, cy);
+}
+
E_API E_Pixmap *
e_client_pixmap_change(E_Client *ec, E_Pixmap *newcp)
{
E_API void e_client_transform_core_input_transform(E_Client *ec, int x, int y, int *out_x, int *out_y);
E_API void e_client_transform_core_input_inv_transform(E_Client *ec, int x, int y, int *out_x, int *out_y);
E_API void e_client_transform_core_input_inv_rect_transform(E_Client *ec, int x, int y, int *out_x, int *out_y);
+EINTERN void e_client_transform_core_update_with_desk_zoom(E_Client *ec);
E_API E_Pixmap *e_client_pixmap_change(E_Client *ec, E_Pixmap *newcp);
E_API void e_client_window_role_set(E_Client *ec, const char *role);
}
}
+static void
+_e_comp_object_transform_obj_map_set_with_zoom(Evas_Object *obj, E_Util_Transform_Rect_Vertex *vertices, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy)
+{
+ if (!obj) return;
+
+ if (vertices)
+ {
+ Evas_Map *map = _e_comp_object_transform_obj_map_new(obj, vertices);
+ if (map)
+ {
+ evas_map_util_zoom(map, zoomx, zoomy, cx, cy);
+
+ evas_object_map_set(obj, map);
+ evas_object_map_enable_set(obj, EINA_TRUE);
+
+ evas_map_free(map);
+ }
+ }
+ else
+ {
+ evas_object_map_enable_set(obj, EINA_FALSE);
+ }
+}
/////////////////////////////////////
static inline Eina_Bool
_e_comp_object_transform_obj_map_set(cw->transform_bg_obj, vertices);
}
+EINTERN void
+e_comp_object_transform_bg_vertices_set_with_zoom(Evas_Object *obj, E_Util_Transform_Rect_Vertex *vertices, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy)
+{
+ API_ENTRY;
+ EINA_SAFETY_ON_NULL_RETURN(cw->ec);
+ if (cw->ec->input_only) return;
+ if (!cw->transform_bg_obj) return;
+
+ _e_comp_object_transform_obj_map_set_with_zoom(cw->transform_bg_obj, vertices, zoomx, zoomy, cx, cy);
+}
+
E_API void
e_comp_object_transform_transp_set(Evas_Object *obj, Eina_Bool set)
{
_e_comp_object_transform_obj_map_set(cw->transform_tranp_obj, vertices);
}
+EINTERN void
+e_comp_object_transform_transp_vertices_set_with_zoom(Evas_Object *obj, E_Util_Transform_Rect_Vertex *vertices, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy)
+{
+ API_ENTRY;
+ EINA_SAFETY_ON_NULL_RETURN(cw->ec);
+ if (cw->ec->input_only) return;
+ if (!cw->transform_tranp_obj) return;
+
+ _e_comp_object_transform_obj_map_set_with_zoom(cw->transform_tranp_obj, vertices, zoomx, zoomy, cx, cy);
+}
+
E_API void
e_comp_object_layer_update(Evas_Object *obj,
Evas_Object *above, Evas_Object *below)
E_API void e_comp_object_size_update(Evas_Object *obj, int w, int h);
E_API void e_comp_object_transform_bg_set(Evas_Object *obj, Eina_Bool set);
E_API void e_comp_object_transform_bg_vertices_set(Evas_Object *obj, E_Util_Transform_Rect_Vertex *vertices);
+EINTERN void e_comp_object_transform_bg_vertices_set_with_zoom(Evas_Object *obj, E_Util_Transform_Rect_Vertex *vertices, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy);
E_API void e_comp_object_transform_transp_set(Evas_Object *obj, Eina_Bool set);
E_API void e_comp_object_transform_transp_vertices_set(Evas_Object *obj, E_Util_Transform_Rect_Vertex *vertices);
+EINTERN void e_comp_object_transform_transp_vertices_set_with_zoom(Evas_Object *obj, E_Util_Transform_Rect_Vertex *vertices, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy);
E_API void e_comp_object_layer_update(Evas_Object *obj, Evas_Object *above, Evas_Object *below);
* Why isn't it enough to just call evas_object_map_enable_set(false)? */
_e_desk_client_zoom(ec, sd->zoom.ratio_x, sd->zoom.ratio_y,
sd->zoom.cord_x, sd->zoom.cord_y);
- evas_object_map_enable_set(ec->frame, EINA_FALSE);
+ //evas_object_map_enable_set(ec->frame, EINA_FALSE);
}
/* FIXME TEMP enable hwc */
static void
_e_desk_client_zoom(E_Client *ec, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy)
{
- _e_desk_object_zoom(ec->frame, zoomx, zoomy, cx, cy);
+ Eina_Bool transformed;
+ transformed = e_client_transform_core_enable_get(ec);
+
+ if (transformed)
+ e_client_transform_core_update_with_desk_zoom(ec);
+ else
+ _e_desk_object_zoom(ec->frame, zoomx, zoomy, cx, cy);
+
+ if (evas_object_visible_get(ec->frame))
+ {
+ // force update
+ e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h);
+ e_comp_object_dirty(ec->frame);
+ e_comp_object_render(ec->frame);
+ }
}