Fix segvs and memleak.

SVN revision: 14769
This commit is contained in:
Kim Woelders 2005-05-14 09:19:54 +00:00
parent 392c5b3892
commit df2a6dcdcd
8 changed files with 24 additions and 7 deletions

View File

@ -1547,6 +1547,7 @@ void EobjReparent(EObj * eo, int desk, int x, int y);
int EobjRaise(EObj * eo);
int EobjLower(EObj * eo);
void EobjChangeShape(EObj * eo);
void EobjsRepaint(void);
#if USE_COMPOSITE
Pixmap EobjGetPixmap(const EObj * eo);

View File

@ -1635,7 +1635,7 @@ ECompMgrRepaintObj(Picture pbuf, XserverRegion region, EObj * eo, int mode)
}
}
static void
void
ECompMgrRepaint(void)
{
Display *dpy = disp;

View File

@ -34,6 +34,7 @@ typedef struct
int EVisualIsARGB(Visual * vis);
void ECompMgrParseArgs(const char *args);
void ECompMgrRepaint(void);
void ECompMgrWinNew(EObj * eo);
void ECompMgrWinDel(EObj * eo, Bool gone, Bool do_fade);

View File

@ -495,3 +495,12 @@ EobjsSlideBy(EObj ** peo, int num, int dx, int dy, int speed)
Efree(xy);
}
void
EobjsRepaint(void)
{
#if USE_COMPOSITE
ECompMgrRepaint();
ESync();
#endif
}

View File

@ -560,6 +560,7 @@ EventsProcess(XEvent ** evq_p, int *evq_n)
return qsz;
}
#if 0 /* FIXME - Remove? */
void
CheckEvent(void)
{
@ -602,6 +603,7 @@ CheckEvent(void)
ModulesSignal(ESIGNAL_IDLE, NULL);
}
#endif
/*
* This is the primary event loop. Everything that is going to happen in the

View File

@ -717,7 +717,7 @@ IconboxesEwinDeIconify(EWin * ewin)
ib = SelectIconboxForEwin(ewin);
if (ib && ib->animate && !ewin->st.showingdesk)
{
CheckEvent();
EobjsRepaint();
IB_Animate(0, ewin, ib->ewin);
}
}
@ -3133,13 +3133,18 @@ static void
IconboxObjSwinDel(Iconbox * ib, Window win)
{
int i;
SWin *swin;
i = IconboxObjSwinFind(ib, win);
if (i < 0)
return;
if (IconboxObjectDel(ib, ib->objs[i].u.swin) == 0)
swin = ib->objs[i].u.swin;
if (IconboxObjectDel(ib, swin) == 0)
IconboxRedraw(ib);
Efree(swin);
}
static void

View File

@ -1301,7 +1301,7 @@ MenuEventKeyPress(Menu * m, XEvent * ev)
if (!mi->params)
break;
MenusHide();
CheckEvent();
EobjsRepaint();
SetContextEwin(Mode_menus.context_ewin);
EFunc(mi->params);
SetContextEwin(NULL);
@ -1376,7 +1376,7 @@ MenuItemEventMouseUp(MenuItem * mi, XEvent * ev __UNUSED__)
if ((mi->params) /* && (!Mode_menus.just_shown) */ )
{
MenusHide();
CheckEvent();
EobjsRepaint();
SetContextEwin(Mode_menus.context_ewin);
EFunc(mi->params);
SetContextEwin(NULL);

View File

@ -173,8 +173,7 @@ ETimedLoopNext(void)
etl_k = etl_k1 + tm * etl_fac;
y = ETimeCurve(etl_k1, etl_k2, etl_k, 2, 1.0);
ESync();
CheckEvent();
EobjsRepaint();
return y;
}