Enlightenment CVS committal Author : handyande Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_zone.c Log Message: Allow edge flipping with xinerama, if we have on other zones on the same edge - i.e. 1 rightof 0 allows us to edge flip up and down =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_zone.c,v retrieving revision 1.91 retrieving revision 1.92 diff -u -3 -r1.91 -r1.92 --- e_zone.c 10 Jan 2006 08:32:27 -0000 1.91 +++ e_zone.c 20 Mar 2006 14:09:24 -0000 1.92 @@ -979,12 +979,38 @@ static void _e_zone_update_flip(E_Zone *zone) { - - if ((e_config->use_edge_flip) && - /* if we have more than 1 zone - disable */ - (evas_list_count(zone->container->zones) == 1)) + if (e_config->use_edge_flip) { - if (E_ZONE_FLIP_LEFT(zone)) + /* if we have only 1 row we can flip up/down even if we have xinerama */ + int one_row = 1; + int one_col = 1; + + if (evas_list_count(zone->container->zones) > 1) + { + Evas_List *zones; + E_Zone *next_zone; + int x, y; + + zones = zone->container->zones; + next_zone = (E_Zone *) evas_list_data(zones); + x = next_zone->x; + y = next_zone->y; + zones = evas_list_next(zones); + + while (zones) + { + next_zone = (E_Zone *) evas_list_data(zones); + + if (next_zone->x != x) + one_col = 0; + if (next_zone->y != y) + one_row = 0; + + zones = evas_list_next(zones); + } + } + + if (one_col && E_ZONE_FLIP_LEFT(zone)) { ecore_x_window_show(zone->flip.left); e_container_window_raise(zone->container, zone->flip.left, 999); @@ -992,7 +1018,7 @@ else ecore_x_window_hide(zone->flip.left); - if (E_ZONE_FLIP_RIGHT(zone)) + if (one_col && E_ZONE_FLIP_RIGHT(zone)) { ecore_x_window_show(zone->flip.right); e_container_window_raise(zone->container, zone->flip.right, 999); @@ -1000,7 +1026,7 @@ else ecore_x_window_hide(zone->flip.right); - if (E_ZONE_FLIP_UP(zone)) + if (one_row && E_ZONE_FLIP_UP(zone)) { ecore_x_window_show(zone->flip.top); e_container_window_raise(zone->container, zone->flip.top, 999); @@ -1008,7 +1034,7 @@ else ecore_x_window_hide(zone->flip.top); - if (E_ZONE_FLIP_DOWN(zone)) + if (one_row && E_ZONE_FLIP_DOWN(zone)) { ecore_x_window_show(zone->flip.bottom); e_container_window_raise(zone->container, zone->flip.bottom, 999); ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs