Fix progress bars with composite enabled.

SVN revision: 22300
This commit is contained in:
Kim Woelders 2006-04-22 13:57:54 +00:00
parent 0ac49e37e4
commit 3340fb36e6
5 changed files with 30 additions and 2 deletions

View File

@ -1569,6 +1569,15 @@ ECompMgrWinMoveResize(EObj * eo, int change_xy, int change_wh, int change_bw)
}
}
void
ECompMgrWinDamageArea(EObj * eo, int x __UNUSED__, int y __UNUSED__,
int w __UNUSED__, int h __UNUSED__)
{
ECmWinInfo *cw = eo->cmhook;
ECompMgrDamageMergeObject(eo, cw->shape, 0);
}
static void
ECompMgrWinConfigure(EObj * eo, XEvent * ev)
{

View File

@ -48,6 +48,8 @@ void ECompMgrWinMap(EObj * eo);
void ECompMgrWinUnmap(EObj * eo);
void ECompMgrWinMoveResize(EObj * eo, int change_xy,
int change_wh, int change_bw);
void ECompMgrWinDamageArea(EObj * eo, int x, int y, int w,
int h);
void ECompMgrWinReparent(EObj * eo, Desk * dsk, int change_xy);
void ECompMgrWinRaise(EObj * eo);
void ECompMgrWinLower(EObj * eo);

View File

@ -409,6 +409,15 @@ EobjResize(EObj * eo, int w, int h)
EobjMoveResize(eo, eo->x, eo->y, w, h);
}
void
EobjDamage(EObj * eo)
{
#if USE_COMPOSITE
if (eo->cmhook)
ECompMgrWinDamageArea(eo, 0, 0, eo->w, eo->h);
#endif
}
void
EobjReparent(EObj * eo, EObj * dst, int x, int y)
{

View File

@ -143,6 +143,7 @@ void EobjUnmap(EObj * eo);
void EobjMove(EObj * eo, int x, int y);
void EobjResize(EObj * eo, int w, int h);
void EobjMoveResize(EObj * eo, int x, int y, int w, int h);
void EobjDamage(EObj * eo);
void EobjReparent(EObj * eo, EObj * dst, int x, int y);
int EobjRaise(EObj * eo);
int EobjLower(EObj * eo);

View File

@ -67,6 +67,9 @@ ProgressbarCreate(const char *name, int w, int h)
ProgressbarDestroy(p);
return NULL;
}
p->win->fade = 0;
p->n_win->fade = 0;
p->p_win->fade = 0;
p->ic = ImageclassFind("PROGRESS_BAR", 1);
if (p->ic)
@ -96,6 +99,8 @@ ProgressbarDestroy(Progressbar * p)
{
int i, j, dy;
ProgressbarHide(p);
dy = 2 * p->h;
EobjWindowDestroy(p->win);
EobjWindowDestroy(p->n_win);
@ -175,8 +180,10 @@ ProgressbarSet(Progressbar * p, int progress)
pad->left, pad->top, p->h * 5 - (pad->left + pad->right),
p->h - (pad->top + pad->bottom), p->h - (pad->top + pad->bottom),
TextclassGetJustification(p->tnc));
/* Hack - We may not be running in the event loop here */
EobjDamage(p->n_win);
EFlush();
EobjsRepaint();
}
void
@ -201,7 +208,7 @@ ProgressbarShow(Progressbar * p)
p->h - (pad->top + pad->bottom), p->h - (pad->top + pad->bottom),
TextclassGetJustification(p->tnc));
EFlush();
EobjsRepaint();
}
void