Patch by David Johnson <davijoh3@cisco.com> to fix Debian bug #816872 [1]:
> wmbattery appears to have a memory leak. When invoked with "wmbattery -w 2"
> it is leaking approx 350KB/minute on my system. Eventually it runs out of
> memory and is killed by kernel.
...
> I've concluded libupower-glib is just super leaky. The below patch
> moves the upower API calls into a child process that doesn't exist for
> long to keep the leaks out of the main process.
> Tested against stretch versions, looks good.
[1] https://bugs.debian.org/816872
In addition to accounting for the various changes in the new version, we
also rename from the deprecated 1x section to just 1 and get the
current version number from autoconf.
Now that we use libdockapp's --windowed option to allow users to choose
whether to run fookb as a dockapp or as a normal windowed application at
runtime, the --enable-wmaker option compile time option did very little.
In particular, it used a config file in ~/GNUstep/Defaults and it printed
a warning message when users used large icon files.
We now use the ~/.fookb config file in all instances and always print the
warning message.
In addition to the obvious simplification to the code by removing all the
window creation stuff, this also allows us to let users pick whether they
want to run fookb as a dockapp or as a normal windowed application at
runtime using libdockapp's --windowed command line option. Previously,
this was done during build using configure's --enable-wmaker option.
Previously, we would try and read the width and height of images read from
an XPM file *before* doing any error handling to determine whether we
successfully read the file in the first place. If there had been an error,
then there would be a segfault.
libdockapp supports shaped dockapps with the DASetShape() function, but this
function requires as input a bitmap. Previously, there was no support for
creating such a bitmap from XBM data without using Xlib directly.
We add two functions, DAMakeShapeFromData(), which is a wrapper around
XCreateBitmapFromData and allows developers to #include XBM data, and
DAMakeShapeFromFile(), which is a wrapper around XReadBitmapfile and
lets developers specify the path to an XBM file.
Some dockapps may want to handle command line options themselves, so we
make this function optional.
Previously, if this function was skipped, then a segfault would result when
trying to access the _daContext global while first creating the dockapp
window.
Now we check if _daContext has been initialized first, and if not, we
initialize it.