Fix geometry for maximized windows when using shelfs on specified desktops.

SVN revision: 55081
This commit is contained in:
Miculcy Brian 2010-11-30 11:10:22 +00:00
parent 1943305019
commit aee4aff7dc
1 changed files with 34 additions and 1 deletions

View File

@ -981,7 +981,10 @@ _e_zone_useful_geometry_calc(E_Zone *zone)
y1 = zone->h;
EINA_LIST_FOREACH(e_shelf_list(), l, shelf)
{
E_Config_Shelf_Desk *sd;
E_Gadcon_Orient orient;
Eina_List *ll;
int skip_shelf = 0;
if (shelf->zone != zone)
continue;
@ -998,6 +1001,22 @@ _e_zone_useful_geometry_calc(E_Zone *zone)
else
orient = shelf->gadcon->orient;
if (shelf->cfg->desk_show_mode)
{
skip_shelf = 1;
EINA_LIST_FOREACH(shelf->cfg->desk_list, ll, sd)
{
if (!sd) continue;
if ((sd->x == zone->desk_x_current) && (sd->y == zone->desk_y_current))
{
skip_shelf = 0;
break;
}
}
if (skip_shelf)
continue;
}
switch (orient)
{
/* these are non-edje orientations */
@ -1049,8 +1068,22 @@ e_zone_useful_geometry_get(E_Zone *zone, int *x, int *y, int *w, int *h)
{
E_OBJECT_CHECK(zone);
E_OBJECT_TYPE_CHECK(zone, E_ZONE_TYPE);
Eina_List *l;
E_Shelf *shelf;
if (zone->useful_geometry.dirty)
if (!zone->useful_geometry.dirty)
{
EINA_LIST_FOREACH(e_shelf_list(), l, shelf)
{
if (!shelf->cfg) continue;
if (shelf->cfg->desk_show_mode)
{
_e_zone_useful_geometry_calc(zone);
break;
}
}
}
else
_e_zone_useful_geometry_calc(zone);
if (x) *x = zone->useful_geometry.x;