fix issue where popusp when moved wouldnt move if te zone HAD moved -

so store zone x, y too to make sure we do move popup too.



SVN revision: 70442
This commit is contained in:
Carsten Haitzler 2012-04-24 14:24:49 +00:00
parent 627b604d26
commit 8ff70e6e8f
4 changed files with 22 additions and 12 deletions

View File

@ -1137,7 +1137,8 @@ _e_container_resize_handle(E_Container *con)
{
zone = NULL;
printf("@@@ SCREENS: %i %i | %i %i %ix%i\n", scr->screen, scr->escreen, scr->x, scr->y, scr->w, scr->h);
printf("@@@ SCREENS: %i %i | %i %i %ix%i\n",
scr->screen, scr->escreen, scr->x, scr->y, scr->w, scr->h);
EINA_LIST_FOREACH(zones, ll, zone)
{
if (zone->id == scr->escreen) break;
@ -1145,25 +1146,26 @@ _e_container_resize_handle(E_Container *con)
}
if (zone)
{
printf("@@@ FOUND ZONE %i %i\n", zone->num, zone->id);
printf("@@@ FOUND ZONE %i %i [%p]\n", zone->num, zone->id, zone);
e_zone_move_resize(zone, scr->x, scr->y, scr->w, scr->h);
e_shelf_zone_move_resize_handle(zone);
zones = eina_list_remove(zones, zone);
con->zones = eina_list_append(con->zones, zone);
zone->num = scr->screen;
e_shelf_zone_move_resize_handle(zone);
}
else
{
Eina_List *ll;
E_Config_Shelf *cf_es;
printf("@@@ container resize handle - new zone\n");
zone = e_zone_new(con, scr->screen, scr->escreen, scr->x, scr->y, scr->w, scr->h);
zone = e_zone_new(con, scr->screen, scr->escreen,
scr->x, scr->y, scr->w, scr->h);
printf("@@@ NEW ZONE = %p\n", zone);
/* find any shelves configured for this zone and add them in */
EINA_LIST_FOREACH(e_config->shelves, ll, cf_es)
{
if (e_util_container_zone_id_get(cf_es->container, cf_es->zone) == zone)
e_shelf_config_new(zone, cf_es);
if (e_util_container_zone_id_get(cf_es->container,
cf_es->zone) == zone)
e_shelf_config_new(zone, cf_es);
}
}
}

View File

@ -1,6 +1,6 @@
#ifdef E_TYPEDEFS
#define E_MODULE_API_VERSION 8
#define E_MODULE_API_VERSION 9
typedef struct _E_Module E_Module;
typedef struct _E_Module_Api E_Module_Api;

View File

@ -42,6 +42,8 @@ e_popup_new(E_Zone *zone, int x, int y, int w, int h)
pop = E_OBJECT_ALLOC(E_Popup, E_POPUP_TYPE, _e_popup_free);
if (!pop) return NULL;
pop->zone = zone;
pop->zx = pop->zone->x;
pop->zy = pop->zone->y;
pop->x = x;
pop->y = y;
pop->w = w;
@ -123,7 +125,10 @@ e_popup_move(E_Popup *pop, int x, int y)
{
E_OBJECT_CHECK(pop);
E_OBJECT_TYPE_CHECK(pop, E_POPUP_TYPE);
if ((pop->x == x) && (pop->y == y)) return;
if ((pop->x == x) && (pop->y == y) &&
(pop->zone->x == pop->zx) && (pop->zone->y == pop->zy)) return;
pop->zx = pop->zone->x;
pop->zy = pop->zone->y;
pop->x = x;
pop->y = y;
ecore_evas_move(pop->ecore_evas,
@ -152,7 +157,10 @@ e_popup_move_resize(E_Popup *pop, int x, int y, int w, int h)
E_OBJECT_CHECK(pop);
E_OBJECT_TYPE_CHECK(pop, E_POPUP_TYPE);
if ((pop->x == x) && (pop->y == y) &&
(pop->w == w) && (pop->h == h)) return;
(pop->w == w) && (pop->h == h) &&
(pop->zone->x == pop->zx) && (pop->zone->y == pop->zy)) return;
pop->zx = pop->zone->x;
pop->zy = pop->zone->y;
pop->x = x;
pop->y = y;
pop->w = w;

View File

@ -12,7 +12,7 @@ struct _E_Popup
{
E_Object e_obj_inherit;
int x, y, w, h;
int x, y, w, h, zx, zy;
int layer;
unsigned char visible : 1;
unsigned char shaped : 1;