Hi
I found strange behavior in my configuration (xinerama - two screens
with two zones). When i select a Enlightenment->Restart from menu the
popups for gadgets on desktop doesn't appear or appear wrongly. After
some time i've found that this depends on on from what screen i am
choosing this enlightenment->restart :)
After some debugging i figured it out:
When restarting enlightenment some gadgets (i.e. calendar) are calling
e_gadgon_popup_new(). Inside that function, zone for popup window (this
zone was used later in ecore_evas_move_resize) is calculated like that:
zone = e_util_zone_current_get(e_manager_current_get());
and in e_manager_current_get is: ecore_x_pointer_xy_get()
... so - i have my answer why restaring from one screen (cursor was on
that screen) and from second screen i have different results...
In other words: during initializing module like calendar - created zone
for popup is assigned depending on current cursor position.
In my patch i've chage this to obtain zone using the gadget position
instead.
But it solves the problem partialy.
Next thing - in function:
e_gadget_popup_show() (which is called later) when calculating popup
position coordinates was calculated using zone:
pop->gcc->gadcon->zone
which in my case was always the first (initial) zone - (of course it was
wrong, because i put a gadgets on different screens for testing).
so i changed it to zone of popup window (which was calculated before, in
e_gadgon_popup_new())
and after that everythings works ok :)
Zones for popups are correctly assigned and popups calculation are also
ok - even after restaring enlightenment (tested with cursor on both
screens).
The problem (obtaining zone using cursor position) resists in other
modules - i.e. photo - but this is a different story which i think
should be treated as a different case.
regards,
manio
jabber/e-mail: ma...@skyboo.net
http://manio.skyboo.net
Index: trunk/e/src/bin/e_gadcon_popup.c
===================================================================
--- e_gadcon_popup.c (revision 40719)
+++ e_gadcon_popup.c (working copy)
@@ -15,10 +15,12 @@
E_Gadcon_Popup *pop;
Evas_Object *o;
E_Zone *zone;
+ Evas_Coord gx, gy;
pop = E_OBJECT_ALLOC(E_Gadcon_Popup, E_GADCON_POPUP_TYPE, _e_gadcon_popup_free);
if (!pop) return NULL;
- zone = e_util_zone_current_get(e_manager_current_get());
+ e_gadcon_client_geometry_get(gcc, &gx, &gy, NULL, NULL);
+ zone = e_container_zone_at_point_get(e_container_current_get(e_manager_current_get()), gx, gy);
pop->win = e_popup_new(zone, 0, 0, 0, 0);
e_popup_layer_set(pop->win, 255);
@@ -98,10 +100,10 @@
/* Popup positioning */
e_gadcon_client_geometry_get(pop->gcc, &gx, &gy, &gw, &gh);
- zx = pop->gcc->gadcon->zone->x;
- zy = pop->gcc->gadcon->zone->y;
- zw = pop->gcc->gadcon->zone->w;
- zh = pop->gcc->gadcon->zone->h;
+ zx = pop->win->zone->x;
+ zy = pop->win->zone->y;
+ zw = pop->win->zone->w;
+ zh = pop->win->zone->h;
switch (pop->gcc->gadcon->orient)
{
case E_GADCON_ORIENT_CORNER_RT:
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel