enlightenment/src/bin/e_widget_bgpreview.c

320 lines
8.9 KiB
C
Raw Normal View History

#include "e.h"
typedef struct _E_Widget_Data E_Widget_Data;
2012-06-20 23:19:43 -07:00
struct _E_Widget_Data
{
Evas_Object *obj, *table;
Eina_List *desks;
int w, h, dx, dy, cx, cy;
};
typedef struct _E_Widget_Desk_Data E_Widget_Desk_Data;
2012-06-20 23:19:43 -07:00
struct _E_Widget_Desk_Data
{
Evas_Object *icon, *thumb, *live;
compositor rewrite / charlie-foxtrot situation huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once. * compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine. ** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes ** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects ** protocol-specific window management and compositor functionality is now kept exclusively in backend files ** e_pixmap api provides generic client finding and rendering api ** screen/xinerama screens are now provided directly by compositor on startup and re-set on change ** e_comp_render_update finally replaced with eina_tiler ** wayland compositor no longer creates X windows ** compositor e_layout removed entirely * e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra * e_manager is just for screensaver and keybind stuff now, possibly remove later? * e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor ** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed. *** do NOT set interceptors on a client's comp_object. seriously. * startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor * ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get * e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas * deskmirror is (more) broken for now * illume is totally fucked * Ecore_X_Window replaced with Ecore_Window in most cases * edge binding XWindows replaced with regular canvas objects * some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result comp files and descriptions: e_comp.c - overall compositor functions, rendering/update loop, shape cutting e_comp_x.c - X window management and compositor functionality e_comp_wl.c - Wayland surface management and compositor functionality e_comp_canvas.c - general compositor canvas functions and utilities e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems additional authors: ivan.briano@intel.com feature: new compositor removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
int zone, manager, x, y;
Ecore_Event_Handler *bg_upd_hdl;
Ecore_Job *resize_job;
Eina_Bool configurable : 1;
};
/* local function prototypes */
static void _e_wid_data_del(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__);
static void _e_wid_livethumb_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj EINA_UNUSED, void *event_info __UNUSED__);
2012-07-11 00:14:28 -07:00
static void _e_wid_del_hook(Evas_Object *obj);
static void _e_wid_reconfigure(E_Widget_Data *wd);
static void _e_wid_desk_cb_config(void *data, Evas *evas, Evas_Object *obj, void *event);
static void _e_wid_cb_resize(void *data, Evas *evas, Evas_Object *obj, void *event);
static Eina_Bool _e_wid_cb_bg_update(void *data, int type, void *event);
EAPI Evas_Object *
2013-04-19 02:07:15 -07:00
e_widget_bgpreview_add(Evas *evas, int nx, int ny)
{
Evas_Object *obj;
E_Widget_Data *wd;
obj = e_widget_add(evas);
wd = E_NEW(E_Widget_Data, 1);
wd->obj = obj;
wd->dx = nx;
wd->dy = ny;
e_widget_data_set(obj, wd);
e_widget_del_hook_set(obj, _e_wid_del_hook);
wd->table = evas_object_table_add(evas);
evas_object_table_padding_set(wd->table, 0, 0);
evas_object_table_align_set(wd->table, 0.5, 0.5);
e_widget_resize_object_set(wd->obj, wd->table);
evas_object_show(wd->table);
e_widget_sub_object_add(wd->obj, wd->table);
2013-04-19 02:07:15 -07:00
e_widget_bgpreview_num_desks_set(obj, wd->dx, wd->dy);
2012-06-20 23:19:43 -07:00
evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE,
_e_wid_cb_resize, NULL);
return obj;
}
2012-06-20 23:19:43 -07:00
EAPI void
2013-04-19 02:07:15 -07:00
e_widget_bgpreview_num_desks_set(Evas_Object *obj, int nx, int ny)
{
E_Widget_Data *wd;
if (!(wd = e_widget_data_get(obj))) return;
wd->dx = nx;
wd->dy = ny;
_e_wid_reconfigure(wd);
}
EAPI Evas_Object *
e_widget_bgpreview_desk_add(Evas *e, E_Zone *zone, int x, int y)
{
E_Widget_Desk_Data *dd;
const char *bgfile;
compositor rewrite / charlie-foxtrot situation huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once. * compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine. ** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes ** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects ** protocol-specific window management and compositor functionality is now kept exclusively in backend files ** e_pixmap api provides generic client finding and rendering api ** screen/xinerama screens are now provided directly by compositor on startup and re-set on change ** e_comp_render_update finally replaced with eina_tiler ** wayland compositor no longer creates X windows ** compositor e_layout removed entirely * e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra * e_manager is just for screensaver and keybind stuff now, possibly remove later? * e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor ** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed. *** do NOT set interceptors on a client's comp_object. seriously. * startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor * ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get * e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas * deskmirror is (more) broken for now * illume is totally fucked * Ecore_X_Window replaced with Ecore_Window in most cases * edge binding XWindows replaced with regular canvas objects * some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result comp files and descriptions: e_comp.c - overall compositor functions, rendering/update loop, shape cutting e_comp_x.c - X window management and compositor functionality e_comp_wl.c - Wayland surface management and compositor functionality e_comp_canvas.c - general compositor canvas functions and utilities e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems additional authors: ivan.briano@intel.com feature: new compositor removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
bgfile = e_bg_file_get(zone->comp->num, zone->num, x, y);
dd = E_NEW(E_Widget_Desk_Data, 1);
compositor rewrite / charlie-foxtrot situation huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once. * compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine. ** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes ** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects ** protocol-specific window management and compositor functionality is now kept exclusively in backend files ** e_pixmap api provides generic client finding and rendering api ** screen/xinerama screens are now provided directly by compositor on startup and re-set on change ** e_comp_render_update finally replaced with eina_tiler ** wayland compositor no longer creates X windows ** compositor e_layout removed entirely * e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra * e_manager is just for screensaver and keybind stuff now, possibly remove later? * e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor ** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed. *** do NOT set interceptors on a client's comp_object. seriously. * startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor * ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get * e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas * deskmirror is (more) broken for now * illume is totally fucked * Ecore_X_Window replaced with Ecore_Window in most cases * edge binding XWindows replaced with regular canvas objects * some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result comp files and descriptions: e_comp.c - overall compositor functions, rendering/update loop, shape cutting e_comp_x.c - X window management and compositor functionality e_comp_wl.c - Wayland surface management and compositor functionality e_comp_canvas.c - general compositor canvas functions and utilities e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems additional authors: ivan.briano@intel.com feature: new compositor removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
dd->manager = zone->comp->num;
dd->zone = zone->num;
dd->x = x;
dd->y = y;
dd->live = e_livethumb_add(e);
dd->thumb = edje_object_add(e_livethumb_evas_get(dd->live));
edje_object_file_set(dd->thumb, bgfile, "e/desktop/background");
e_livethumb_thumb_set(dd->live, dd->thumb);
evas_object_show(dd->thumb);
eina_stringshare_del(bgfile);
evas_object_data_set(dd->live, "desk_data", dd);
evas_object_event_callback_add(dd->live, EVAS_CALLBACK_FREE, _e_wid_data_del, dd);
evas_object_event_callback_add(dd->live, EVAS_CALLBACK_RESIZE, _e_wid_livethumb_resize, dd);
dd->bg_upd_hdl = ecore_event_handler_add(E_EVENT_BG_UPDATE,
_e_wid_cb_bg_update, dd);
return dd->live;
}
EAPI void
2013-04-19 02:07:15 -07:00
e_widget_bgpreview_desk_configurable_set(Evas_Object *obj, Eina_Bool enable)
{
E_Widget_Desk_Data *dd;
EINA_SAFETY_ON_NULL_RETURN(obj);
dd = evas_object_data_get(obj, "desk_data");
EINA_SAFETY_ON_NULL_RETURN(dd);
enable = !!enable;
if (dd->configurable == enable) return;
if (enable)
evas_object_event_callback_add(dd->icon, EVAS_CALLBACK_MOUSE_DOWN,
_e_wid_desk_cb_config, dd);
else
evas_object_event_callback_del_full(dd->icon, EVAS_CALLBACK_MOUSE_DOWN,
_e_wid_desk_cb_config, dd);
dd->configurable = enable;
}
/* local function prototypes */
static void
_e_wid_livethumb_resize_job(void *data)
{
E_Widget_Desk_Data *dd = data;
E_Zone *zone;
int w, h;
zone = e_comp_object_util_zone_get(dd->live);
if (!zone) zone = eina_list_data_get(e_comp_get(NULL)->zones);
evas_object_geometry_get(dd->live, NULL, NULL, &w, &h);
w *= 2;
h *= 2;
if (w > 128)
{
w = 128;
h = (zone->h * w) / zone->w;
}
if (h > 128)
{
h = 128;
w = (zone->w * h) / zone->h;
}
e_livethumb_vsize_set(dd->live, w, h);
dd->resize_job = NULL;
}
static void
_e_wid_livethumb_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj EINA_UNUSED, void *event_info __UNUSED__)
{
E_Widget_Desk_Data *dd = data;
if (!dd->resize_job)
dd->resize_job = ecore_job_add(_e_wid_livethumb_resize_job, dd);
}
static void
_e_wid_data_del(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
E_Widget_Desk_Data *dd;
dd = data;
if (!dd) return;
if (dd->bg_upd_hdl) ecore_event_handler_del(dd->bg_upd_hdl);
evas_object_del(dd->live);
ecore_job_del(dd->resize_job);
free(dd);
}
2012-06-20 23:19:43 -07:00
static void
_e_wid_del_hook(Evas_Object *obj)
{
E_Widget_Data *wd;
Evas_Object *o;
if (!(wd = e_widget_data_get(obj))) return;
2012-06-20 23:19:43 -07:00
EINA_LIST_FREE(wd->desks, o)
evas_object_del(o);
E_FREE(wd);
}
2012-06-20 23:19:43 -07:00
static void
_e_wid_reconfigure(E_Widget_Data *wd)
{
Eina_List *l, *ll;
Evas_Object *dw;
E_Zone *zone;
int tw, th, mw, mh, y;
E_Widget_Desk_Data *dd;
double zone_ratio, desk_ratio;
2012-06-20 23:19:43 -07:00
zone = e_util_zone_current_get(e_manager_current_get());
evas_object_geometry_get(wd->table, NULL, NULL, &tw, &th);
if ((tw == 0) || (th == 0))
{
mw = mh = 0;
}
2012-06-20 23:19:43 -07:00
else
{
zone_ratio = (double)zone->w / zone->h;
desk_ratio = (tw / wd->dx) / (th / wd->dy);
2012-06-20 23:19:43 -07:00
if (zone_ratio > desk_ratio)
{
mw = tw / wd->dx;
mh = mw / zone_ratio;
}
else
{
mh = th / wd->dy;
mw = mh * zone_ratio;
}
}
2012-06-20 23:19:43 -07:00
EINA_LIST_FOREACH_SAFE(wd->desks, l, ll, dw)
{
if (!(dd = evas_object_data_get(dw, "desk_data"))) continue;
2012-06-20 23:19:43 -07:00
if ((dd->x < wd->dx) && (dd->y < wd->dy))
{
evas_object_size_hint_min_set(dw, mw, mh);
evas_object_size_hint_max_set(dw, mw, mh);
}
else
2012-07-11 00:14:28 -07:00
{
evas_object_del(dd->live);
2012-07-11 00:14:28 -07:00
evas_object_del(dw);
wd->desks = eina_list_remove(wd->desks, dw);
}
}
2012-06-20 23:19:43 -07:00
for (y = 0; y < wd->dy; y++)
{
int x, sx;
if (y >= wd->cy) sx = 0;
else sx = wd->cx;
2012-06-20 23:19:43 -07:00
for (x = sx; x < wd->dx; x++)
{
Evas_Object *dp;
Evas *e;
e = evas_object_evas_get(wd->obj);
dp = e_widget_bgpreview_desk_add(e, zone, x, y);
dd = evas_object_data_get(dp, "desk_data");
dp = dd->icon = edje_object_add(e);
e_theme_edje_object_set(dd->icon, "base/theme/widgets",
"e/widgets/deskpreview/desk");
edje_object_part_swallow(dd->icon, "e.swallow.content", dd->live);
dd->configurable = EINA_TRUE;
evas_object_event_callback_add(dd->icon, EVAS_CALLBACK_MOUSE_DOWN,
_e_wid_desk_cb_config, dd);
evas_object_show(dd->icon);
evas_object_data_set(dd->icon, "desk_data", dd);
evas_object_size_hint_min_set(dp, mw, mh);
evas_object_size_hint_max_set(dp, mw, mh);
2012-07-11 00:14:28 -07:00
evas_object_size_hint_aspect_set(dp, EVAS_ASPECT_CONTROL_BOTH, zone->w, zone->h);
evas_object_table_pack(wd->table, dp, x, y, 1, 1);
wd->desks = eina_list_append(wd->desks, dp);
}
}
wd->cx = wd->dx;
wd->cy = wd->dy;
}
2012-06-20 23:19:43 -07:00
static void
_e_wid_desk_cb_config(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event)
{
E_Widget_Desk_Data *dd;
Evas_Event_Mouse_Down *ev;
ev = event;
if (!(dd = data)) return;
2012-06-20 23:19:43 -07:00
if (ev->button == 1)
{
char buff[256];
2012-06-20 23:19:43 -07:00
snprintf(buff, sizeof(buff), "%i %i %i %i",
compositor rewrite / charlie-foxtrot situation huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once. * compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine. ** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes ** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects ** protocol-specific window management and compositor functionality is now kept exclusively in backend files ** e_pixmap api provides generic client finding and rendering api ** screen/xinerama screens are now provided directly by compositor on startup and re-set on change ** e_comp_render_update finally replaced with eina_tiler ** wayland compositor no longer creates X windows ** compositor e_layout removed entirely * e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra * e_manager is just for screensaver and keybind stuff now, possibly remove later? * e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor ** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed. *** do NOT set interceptors on a client's comp_object. seriously. * startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor * ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get * e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas * deskmirror is (more) broken for now * illume is totally fucked * Ecore_X_Window replaced with Ecore_Window in most cases * edge binding XWindows replaced with regular canvas objects * some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result comp files and descriptions: e_comp.c - overall compositor functions, rendering/update loop, shape cutting e_comp_x.c - X window management and compositor functionality e_comp_wl.c - Wayland surface management and compositor functionality e_comp_canvas.c - general compositor canvas functions and utilities e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems additional authors: ivan.briano@intel.com feature: new compositor removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
dd->manager, dd->zone, dd->x, dd->y);
e_configure_registry_call("internal/desk", NULL, buff);
}
}
2012-06-20 23:19:43 -07:00
static void
_e_wid_cb_resize(void *data __UNUSED__, Evas *evas __UNUSED__, Evas_Object *obj, void *event __UNUSED__)
{
E_Widget_Data *wd;
if (!(wd = e_widget_data_get(obj))) return;
_e_wid_reconfigure(wd);
}
static Eina_Bool
_e_wid_cb_bg_update(void *data, int type, void *event)
{
E_Event_Bg_Update *ev;
E_Widget_Desk_Data *dd;
if (type != E_EVENT_BG_UPDATE) return ECORE_CALLBACK_PASS_ON;
if (!(dd = data)) return ECORE_CALLBACK_PASS_ON;
ev = event;
compositor rewrite / charlie-foxtrot situation huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once. * compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine. ** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes ** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects ** protocol-specific window management and compositor functionality is now kept exclusively in backend files ** e_pixmap api provides generic client finding and rendering api ** screen/xinerama screens are now provided directly by compositor on startup and re-set on change ** e_comp_render_update finally replaced with eina_tiler ** wayland compositor no longer creates X windows ** compositor e_layout removed entirely * e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra * e_manager is just for screensaver and keybind stuff now, possibly remove later? * e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor ** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed. *** do NOT set interceptors on a client's comp_object. seriously. * startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor * ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get * e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas * deskmirror is (more) broken for now * illume is totally fucked * Ecore_X_Window replaced with Ecore_Window in most cases * edge binding XWindows replaced with regular canvas objects * some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result comp files and descriptions: e_comp.c - overall compositor functions, rendering/update loop, shape cutting e_comp_x.c - X window management and compositor functionality e_comp_wl.c - Wayland surface management and compositor functionality e_comp_canvas.c - general compositor canvas functions and utilities e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems additional authors: ivan.briano@intel.com feature: new compositor removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
if (((ev->manager < 0) || (dd->manager == ev->manager)) &&
((ev->zone < 0) || (dd->zone == ev->zone)) &&
((ev->desk_x < 0) || (dd->x == ev->desk_x)) &&
((ev->desk_y < 0) || (dd->y == ev->desk_y)))
{
const char *bgfile;
compositor rewrite / charlie-foxtrot situation huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once. * compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine. ** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes ** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects ** protocol-specific window management and compositor functionality is now kept exclusively in backend files ** e_pixmap api provides generic client finding and rendering api ** screen/xinerama screens are now provided directly by compositor on startup and re-set on change ** e_comp_render_update finally replaced with eina_tiler ** wayland compositor no longer creates X windows ** compositor e_layout removed entirely * e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra * e_manager is just for screensaver and keybind stuff now, possibly remove later? * e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor ** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed. *** do NOT set interceptors on a client's comp_object. seriously. * startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor * ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get * e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas * deskmirror is (more) broken for now * illume is totally fucked * Ecore_X_Window replaced with Ecore_Window in most cases * edge binding XWindows replaced with regular canvas objects * some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result comp files and descriptions: e_comp.c - overall compositor functions, rendering/update loop, shape cutting e_comp_x.c - X window management and compositor functionality e_comp_wl.c - Wayland surface management and compositor functionality e_comp_canvas.c - general compositor canvas functions and utilities e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems additional authors: ivan.briano@intel.com feature: new compositor removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
bgfile = e_bg_file_get(dd->manager, dd->zone, dd->x, dd->y);
2014-01-14 19:50:28 -08:00
edje_object_file_set(dd->thumb, bgfile, "e/desktop/background");
eina_stringshare_del(bgfile);
}
return ECORE_CALLBACK_PASS_ON;
}
2012-07-11 00:14:28 -07:00