Enlightenment CVS committal
Author : raster
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_zone.c
Log Message:
fix flip for xinerama
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_zone.c,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -3 -r1.97 -r1.98
--- e_zone.c 7 Jun 2006 23:30:13 -0000 1.97
+++ e_zone.c 9 Aug 2006 04:38:32 -0000 1.98
@@ -269,30 +269,56 @@
{
E_OBJECT_CHECK(zone);
E_OBJECT_TYPE_CHECK(zone, E_ZONE_TYPE);
+ int one_row = 1;
+ int one_col = 1;
if (!e_config->use_edge_flip) return;
- if ((y == 0) && E_ZONE_FLIP_UP(zone))
+ /* if we have only 1 row we can flip up/down even if we have xinerama */
+ if (evas_list_count(zone->container->zones) > 1)
+ {
+ Evas_List *zones;
+ E_Zone *next_zone;
+ int cx, cy;
+
+ zones = zone->container->zones;
+ next_zone = (E_Zone *) evas_list_data(zones);
+ cx = next_zone->x;
+ cy = next_zone->y;
+ zones = evas_list_next(zones);
+ while (zones)
+ {
+ next_zone = (E_Zone *)zones->data;
+ if (next_zone->x != cx) one_col = 0;
+ if (next_zone->y != cy) one_row = 0;
+ zones = zones->next;
+ }
+ }
+ if (evas_list_count(zone->container->manager->containers) > 1)
+ goto noflip;
+ if (!E_INSIDE(x, y, zone->x, zone->y, zone->w, zone->h))
+ goto noflip;
+ if ((one_row) && (y == 0) && E_ZONE_FLIP_UP(zone))
{
/* top */
if (!zone->flip.timer)
zone->flip.timer = ecore_timer_add(e_config->edge_flip_timeout,
_e_zone_cb_timer, zone);
zone->flip.direction = E_DIRECTION_UP;
}
- else if ((x == (zone->w - 1)) && E_ZONE_FLIP_RIGHT(zone))
+ else if ((one_col) && (x == (zone->w - 1)) && E_ZONE_FLIP_RIGHT(zone))
{
/* right */
if (!zone->flip.timer)
zone->flip.timer = ecore_timer_add(e_config->edge_flip_timeout,
_e_zone_cb_timer, zone);
zone->flip.direction = E_DIRECTION_RIGHT;
}
- else if ((y == (zone->h - 1)) && E_ZONE_FLIP_DOWN(zone))
+ else if ((one_row) && (y == (zone->h - 1)) && E_ZONE_FLIP_DOWN(zone))
{
/* bottom */
if (!zone->flip.timer)
zone->flip.timer = ecore_timer_add(e_config->edge_flip_timeout,
_e_zone_cb_timer, zone);
zone->flip.direction = E_DIRECTION_DOWN;
}
- else if ((x == 0) && E_ZONE_FLIP_LEFT(zone))
+ else if ((one_col) && (x == 0) && E_ZONE_FLIP_LEFT(zone))
{
/* left */
if (!zone->flip.timer)
@@ -301,6 +327,7 @@
}
else
{
+ noflip:
/* in zone */
if (zone->flip.timer)
ecore_timer_del(zone->flip.timer);
@@ -935,7 +962,7 @@
case E_DIRECTION_UP:
if (E_ZONE_FLIP_UP(zone))
{
- e_zone_desk_flip_by(zone, 0, -1);
+ e_zone_desk_flip_by(zone, 0, -1);
ecore_x_pointer_warp(zone->container->win, x, zone->h - 2);
ev->curr.x = x;
ev->curr.y = zone->h - 2;
@@ -1014,18 +1041,18 @@
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);
+ next_zone = (E_Zone *)zones->data;
+ if (next_zone->x != x) one_col = 0;
+ if (next_zone->y != y) one_row = 0;
+ zones = zones->next;
}
+ }
+ if (evas_list_count(zone->container->manager->containers) > 1)
+ {
+ one_col = 0;
+ one_row = 0;
}
if (one_col && E_ZONE_FLIP_LEFT(zone))
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs