diff options
author | Mike Blumenkrantz <zmike@samsung.com> | 2014-01-14 20:19:12 -0500 |
---|---|---|
committer | Mike Blumenkrantz <zmike@samsung.com> | 2014-01-14 20:22:02 -0500 |
commit | 86656e4df9d9125d594e9b24ba793c252b6a0a9f (patch) | |
tree | 651b51b9216b24b3158dfb973f45f2dde6a645ce /src/bin/e_resist.c | |
parent | 7f0c849a27573fdb5b646a3dc39ff7d6200cf8ed (diff) | |
download | enlightenment-86656e4df9d9125d594e9b24ba793c252b6a0a9f.tar.gz |
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
Diffstat (limited to 'src/bin/e_resist.c')
-rw-r--r-- | src/bin/e_resist.c | 43 |
1 files changed, 15 insertions, 28 deletions
diff --git a/src/bin/e_resist.c b/src/bin/e_resist.c index c760eb759f..6f65481330 100644 --- a/src/bin/e_resist.c +++ b/src/bin/e_resist.c @@ -12,15 +12,14 @@ struct _E_Resist_Rect static void _e_resist_rects(Eina_List *rects, int px, int py, int pw, int ph, int x, int y, int w, int h, int *rx, int *ry, int *rw, int *rh); EAPI int -e_resist_container_border_position(E_Container *con, Eina_List *skiplist, +e_resist_client_position(E_Comp *c, Eina_List *skiplist, int px, int py, int pw, int ph, int x, int y, int w, int h, int *rx, int *ry, int *rw, int *rh) { - Eina_List *l, *ll, *rects = NULL; + Eina_List *l, *rects = NULL; E_Resist_Rect *r; - E_Border_List *bl; - E_Border *bd, *bd2; + E_Client *ec; E_Desk *desk; E_Shelf *es; E_Zone *zone; @@ -50,45 +49,33 @@ e_resist_container_border_position(E_Container *con, Eina_List *skiplist, rects = eina_list_append(rects, r); \ } - EINA_LIST_FOREACH(con->zones, l, zone) + EINA_LIST_FOREACH(c->zones, l, zone) { HOLDER(zone->x, zone->y, zone->w, zone->h, e_config->desk_resist); } /* FIXME: need to add resist or complete BLOCKS for things like ibar */ /* can add code here to add more fake obstacles with custom resist values */ /* here if need be - ie xinerama middle between screens and panels etc. */ - - bl = e_container_border_list_first(con); - while ((bd = e_container_border_list_next(bl))) + ec = e_client_bottom_get(c); + do { - if (bd->visible) + if (ec->visible && (!e_client_util_ignored_get(ec))) { - int ok; - - ok = 1; - EINA_LIST_FOREACH(skiplist, ll, bd2) - { - if (bd2 == bd) - { - ok = 0; - break; - } - } - if (ok && bd->offer_resistance) + if (ec->offer_resistance && (!eina_list_data_find(skiplist, ec))) { - OBSTACLE(bd->x, bd->y, bd->w, bd->h, e_config->window_resist); + OBSTACLE(ec->x, ec->y, ec->w, ec->h, e_config->window_resist); } } - } - e_container_border_list_free(bl); + ec = e_client_above_get(ec); + } while (ec); - desk = e_desk_current_get(e_zone_current_get(con)); + desk = e_desk_current_get(e_zone_current_get(c)); EINA_LIST_FOREACH(e_shelf_list(), l, es) { Eina_List *ll2; E_Config_Shelf_Desk *sd; - if (es->zone->container == con) + if (es->zone->comp == c) { if (es->cfg->desk_show_mode) { @@ -123,7 +110,7 @@ e_resist_container_border_position(E_Container *con, Eina_List *skiplist, } EAPI int -e_resist_container_gadman_position(E_Container *con, Eina_List *skiplist __UNUSED__, +e_resist_gadman_position(E_Comp *c, Eina_List *skiplist __UNUSED__, int px, int py, int pw, int ph, int x, int y, int w, int h, int *rx, int *ry) @@ -141,7 +128,7 @@ e_resist_container_gadman_position(E_Container *con, Eina_List *skiplist __UNUSE EINA_LIST_FOREACH(e_shelf_list(), l, es) { - if (es->zone->container == con) + if (es->zone->comp == c) { OBSTACLE(es->x + es->zone->x, es->y + es->zone->y, es->w, es->h, e_config->gadget_resist); |