On Tuesday 20 October 2009 10:47:28 Janek Kozicki wrote:
> I'm returning 0, because 0 is also returned at the end of this
> function call.
0 is returned if memory allocation fails. It is a nasty situation that
should not happen normally: Sawfish is out of memory and therefore
unable to manage a new window. There is not much that can be done, so
Sawfish just prints a warning and tries to limp on.
What bothers me is that I still don't understand how your Valgrind
report from before this change came about. Presumably it was from
before-add-window-hook, which got called with a "gone" window.
Functions should generally be able to cope with that, because windows
may become "gone" practically at any time. Did some function have a
problem with that? Unfortunately it is difficult to analyse the
backtrace from lispmach.h.
--
Timo Korvola <URL:http://www.iki.fi/tkorvola>