- "Untitled window" appears in xfce4-wmdock-plugin's enumeration of
dockapps using libdockapp.
- Reference to string buffer that might not live long enough.
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.
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 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>