libdockapp: Do not include pathnames in Window Name and Class Properties
commitfa7743bc58430e2b99ec45700365ca6196447ad8
authorDoug Torrance <dtorrance@piedmont.edu>
Wed, 26 Apr 2017 21:40:32 +0000 (26 17:40 -0400)
committerCarlos R. Mafra <crmafra@gmail.com>
Wed, 26 Apr 2017 22:27:19 +0000 (26 23:27 +0100)
tree92574fdee422ed8be3c2a8063f6023a259a245c9
parent139c230a8a5bf238b4d6f08918a3abf2ea849afb
libdockapp: Do not include pathnames in Window Name and Class Properties

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
libdockapp/src/wmgeneral.c