Cleanups, issue warning on missing unregistration.

SVN revision: 22444
This commit is contained in:
Kim Woelders 2006-05-02 20:06:32 +00:00
parent 10f06763c6
commit bd6d2a8632
2 changed files with 14 additions and 12 deletions

View File

@ -216,7 +216,11 @@ EobjFini(EObj * eo)
Eprintf("EobjFini: %#lx %s\n", EobjGetXwin(eo), eo->name);
EobjListStackDel(eo);
if (!eo->external)
if (eo->external)
{
EUnregisterWindow(eo->win);
}
else
{
EDestroyWindow(eo->win);
eo->gone = 1;

20
src/x.c
View File

@ -216,15 +216,7 @@ EventCallbackRegister(Win win, int type __UNUSED__, EventCallbackFunc * func,
xid = EXidFind(win);
if (!xid)
{
ERegisterWindow(Xwin(win)); /* FIXME - We shouldn't go here */
xid = EXidFind(win);
if (!xid)
{
Eprintf("EventCallbackRegister win=%#lx ???\n", Xwin(win));
return;
}
}
return;
#if 0
Eprintf("EventCallbackRegister: %p %#lx\n", xid, win);
#endif
@ -674,8 +666,14 @@ EUnregisterXwin(Window xwin)
EXID *xid;
xid = EXidLookup(xwin);
if (xid)
EXidDel(xid); /* FIXME - We shouldn't go here */
if (!xid)
return;
/* FIXME - We shouldn't go here */
EXidDel(xid);
#if 1 /* Debug - Fix code if we get here */
Eprintf("*** FIXME - EUnregisterXwin %#lx\n", xwin);
#endif
}
void