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.
In Window Maker, windows with application class "DockApp" are automatically
withdrawn. We don't want this in windowed mode. We use the application
name instead, with the usual convention of capitalizing the initial letter.
Patch by Corin-EU from GitHub [1].
In libdockapps file wmgeneral.c, wname is set from argv[0] and is then used
to set the window name and class resource. Often applications are called with
their full path which then means that the window name has a path in it,
thereby requiring an unwieldy path specific string for "Name" in WMState if
the applet is to be captured in the WM dock.
The simple solution is that wname should be the basename of argv[0] to
ensure that the window name for the applet is the simple and obvious one.
Thus the inclusion of header file libgen.h is required.
Just say "no" to path slashes "/" in window name/class resources ....
[1] https://github.com/d-torrance/dockapps/issues/5
This fixes the package-contains-timestamped-gzip warning given by Lintian
for the Debian package. (This warning is really unnecessary, as its purpose
it to check for reproducible builds and the fonts are not compressed at
build time, but I see no harm in removing these timestamps.)
In the README it is said to run ./configure but there's no such script in the
tarball. I wrote instructions to generate a ./configure with libtool and autotools.
This patch includes the libwmgeneral library in the libdockapp
library.
The new library is now version 3 (previous was version 2) and it
includes the new include folder in $libdir/libdockapp.
The wmgeneral files were moved from the previous folder (libwmgeneral)
and the folder is now removed.
Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
Otherwise, we get the following compiler warning:
basic.c: In function ‘main’:
basic.c:111:2: warning: implicit declaration of function ‘time’ [-Wimplicit-function-declaration]
srandom(time(NULL));
^