forked from enlightenment/enlightenment
pager16: resize on desktop bug fix
Summary: pager16 is not properly resized when it is a desktop gadget. Case 1. In move/resize mode, shrink is impossible since all items' min has been set by setting table options on resizing. -> Do not set table options in _pager_resize(). Case 2. After log-in, if we open new window, pager has been get into move/resize mode. frame resize was ignored, since it's invoked in the middle of resizing. The detail is: 1) gadcon's frame is resizing 2) the table is resized 3) _pager_resize() -> e_gadcon_client_aspect_set() -> _gadman_gadget_size_hints_cb() -> try to resize frame 4) since frame is in the middle of resizing, the resize request has been ignored. (at start, since the initial size was 0, 0, pager get into move/resize mode) -> Defer aspect setting. fixes T1012 Test Plan: Caes 1. try to shrink pager16 gadget on desktop Case 2. open any window after log-in -> check whether the pager has been getting into move/resize mode and shrink Reviewers: zmike Subscribers: cedric, seoz Maniphest Tasks: T1012 Differential Revision: https://phab.enlightenment.org/D1242
This commit is contained in:
parent
bed733d100
commit
aada5dea8d
|
@ -50,7 +50,8 @@ struct _Pager
|
|||
Evas_Coord dnd_x, dnd_y;
|
||||
Pager_Desk *active_drop_pd;
|
||||
E_Client *active_drag_client;
|
||||
Eina_Bool invert : 1;
|
||||
Eina_Bool invert : 1;
|
||||
Eina_Bool recalc : 1;
|
||||
};
|
||||
|
||||
struct _Pager_Desk
|
||||
|
@ -309,7 +310,7 @@ _gc_id_new(const E_Gadcon_Client_Class *client_class)
|
|||
}
|
||||
|
||||
static void
|
||||
_pager_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
_pager_recalc(void *data)
|
||||
{
|
||||
Pager *p = data;
|
||||
Eina_List *l;
|
||||
|
@ -317,6 +318,7 @@ _pager_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi
|
|||
Evas_Coord mw = 0, mh = 0;
|
||||
int w, h, zw, zh, w2, h2;
|
||||
|
||||
p->recalc = EINA_FALSE;
|
||||
zw = p->zone->w; zh = p->zone->h;
|
||||
pd = eina_list_data_get(p->desks);
|
||||
if (!pd) return;
|
||||
|
@ -331,8 +333,6 @@ _pager_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi
|
|||
}
|
||||
w = w2; h = h2;
|
||||
w += mw; h += mh;
|
||||
EINA_LIST_FOREACH(p->desks, l, pd)
|
||||
e_table_pack_options_set(pd->o_desk, 1, 1, 1, 1, 0.5, 0.5, w, h, -1, -1);
|
||||
if ((p->inst) && (p->inst->gcc))
|
||||
{
|
||||
if (p->invert)
|
||||
|
@ -342,6 +342,16 @@ _pager_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_pager_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Pager *p = data;
|
||||
|
||||
if (p->recalc) return;
|
||||
p->recalc = EINA_TRUE;
|
||||
ecore_job_add(_pager_recalc, p);
|
||||
}
|
||||
|
||||
static Pager *
|
||||
_pager_new(Evas *evas, E_Zone *zone, E_Gadcon *gc)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue