forked from enlightenment/enlightenment
Recalc border on font change.
Don't call an iterator next. SVN revision: 16166
This commit is contained in:
parent
95fe198447
commit
18bec70092
1
TODO
1
TODO
|
@ -15,7 +15,6 @@ Some of the things (in very short form) that need to be done to E17...
|
|||
desktop switches for the desk a fullscreened window is on, nor allow windows
|
||||
to be raised above the fs win etc. ie the app must seem to be entirely fs for
|
||||
that zone.
|
||||
* BUG: on font apply borders need to be adjusted for size changes
|
||||
* BUG: if i downclock my machine to like 400mhz (make it sloooow) or load it
|
||||
down with lots of load and then hold down ctrl+alt+right for a while
|
||||
windows on desktops vanish... there must be a race condition with a
|
||||
|
|
|
@ -1919,6 +1919,47 @@ e_border_resize_cancel(void)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
e_border_frame_recalc(E_Border *bd)
|
||||
{
|
||||
Evas_Coord cx, cy, cw, ch;
|
||||
|
||||
if (!bd->bg_object) return;
|
||||
|
||||
bd->w -= (bd->client_inset.l + bd->client_inset.r);
|
||||
bd->h -= (bd->client_inset.t + bd->client_inset.b);
|
||||
|
||||
evas_object_resize(bd->bg_object, 1000, 1000);
|
||||
edje_object_calc_force(bd->bg_object);
|
||||
edje_object_part_geometry_get(bd->bg_object, "client", &cx, &cy, &cw, &ch);
|
||||
bd->client_inset.l = cx;
|
||||
bd->client_inset.r = 1000 - (cx + cw);
|
||||
bd->client_inset.t = cy;
|
||||
bd->client_inset.b = 1000 - (cy + ch);
|
||||
ecore_x_netwm_frame_size_set(bd->client.win,
|
||||
bd->client_inset.l, bd->client_inset.r,
|
||||
bd->client_inset.t, bd->client_inset.b);
|
||||
ecore_x_e_frame_size_set(bd->client.win,
|
||||
bd->client_inset.l, bd->client_inset.r,
|
||||
bd->client_inset.t, bd->client_inset.b);
|
||||
|
||||
bd->w += (bd->client_inset.l + bd->client_inset.r);
|
||||
bd->h += (bd->client_inset.t + bd->client_inset.b);
|
||||
|
||||
bd->changed = 1;
|
||||
bd->changes.size = 1;
|
||||
if ((bd->shaped) || (bd->client.shaped))
|
||||
{
|
||||
bd->need_shape_merge = 1;
|
||||
bd->need_shape_export = 1;
|
||||
}
|
||||
ecore_x_icccm_move_resize_send(bd->client.win,
|
||||
bd->x + bd->client_inset.l,
|
||||
bd->y + bd->client_inset.t,
|
||||
bd->client.w,
|
||||
bd->client.h);
|
||||
}
|
||||
|
||||
Evas_List *
|
||||
e_border_immortal_windows_get(void)
|
||||
{
|
||||
|
|
|
@ -519,6 +519,7 @@ EAPI Evas_List *e_border_lost_windows_get(E_Zone *zone);
|
|||
EAPI void e_border_ping(E_Border *bd);
|
||||
EAPI void e_border_move_cancel(void);
|
||||
EAPI void e_border_resize_cancel(void);
|
||||
EAPI void e_border_frame_recalc(E_Border *bd);
|
||||
EAPI Evas_List *e_border_immortal_windows_get(void);
|
||||
|
||||
extern EAPI int E_EVENT_BORDER_RESIZE;
|
||||
|
|
|
@ -30,29 +30,27 @@ void
|
|||
e_font_apply(void)
|
||||
{
|
||||
char buf[1024];
|
||||
Evas_List *next;
|
||||
Evas_List *l;
|
||||
E_Font_Fallback *eff;
|
||||
E_Font_Default *efd;
|
||||
int blen, len;
|
||||
|
||||
/* setup edje fallback list */
|
||||
blen = sizeof(buf) - 1;
|
||||
buf[0] = 0;
|
||||
buf[blen] = 0;
|
||||
next = e_config->font_fallbacks;
|
||||
if (next)
|
||||
l = e_config->font_fallbacks;
|
||||
if (l)
|
||||
{
|
||||
eff = evas_list_data(next);
|
||||
eff = evas_list_data(l);
|
||||
len = strlen(eff->name);
|
||||
if (len < blen)
|
||||
{
|
||||
strcpy(buf, eff->name);
|
||||
blen -= len;
|
||||
}
|
||||
next = evas_list_next(next);
|
||||
while (next)
|
||||
for (l = evas_list_next(l); l; l = l->next)
|
||||
{
|
||||
eff = evas_list_data(next);
|
||||
eff = evas_list_data(l);
|
||||
len = 1;
|
||||
if (len < blen)
|
||||
{
|
||||
|
@ -65,7 +63,6 @@ e_font_apply(void)
|
|||
strcat(buf, eff->name);
|
||||
blen -= len;
|
||||
}
|
||||
next = evas_list_next(next);
|
||||
}
|
||||
edje_fontset_append_set(buf);
|
||||
}
|
||||
|
@ -73,11 +70,22 @@ e_font_apply(void)
|
|||
edje_fontset_append_set(NULL);
|
||||
|
||||
/* setup edje text classes */
|
||||
for (next = e_config->font_defaults; next; next = next->next)
|
||||
for (l = e_config->font_defaults; l; l = l->next)
|
||||
{
|
||||
efd = evas_list_data(next);
|
||||
E_Font_Default *efd;
|
||||
|
||||
efd = evas_list_data(l);
|
||||
edje_text_class_set(efd->text_class, efd->font, efd->size);
|
||||
}
|
||||
|
||||
/* Update borders */
|
||||
for (l = e_border_clients_get(); l; l = l->next)
|
||||
{
|
||||
E_Border *bd;
|
||||
|
||||
bd = l->data;
|
||||
e_border_frame_recalc(bd);
|
||||
}
|
||||
}
|
||||
|
||||
Evas_List *
|
||||
|
|
Loading…
Reference in New Issue