NET_WM_ICON is a property change, not a message.
updateIconImage doesn't use scr, remove it.
updateIconImage should clear out the net_icon_image if there isn't one
anymore (i.e. XGetWindowProperty fails or the icon cannot be extracted).
When the icon is changed, we need to call wIconUpdate.
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
Non-obvious fixes:
WINGs/wfilepanel.c: Cast to void to avoid an unused calculated value
warning.
WINGs/wtabview.c: Test tab<0 to avoid a warning from the next condition
about signed overflow in an inlined invocation of the function.
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
- add WMFindInTreeWithDepthLimit, which is like WMFindInTree, but
does not descend down more than a set limit.
- add WMTreeWalk, which will walk a WMTreeNode, running a callback
function on each node.
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
When applications are embedded in firefox via mozplugger, e.g. ooffice
for viewing .doc files or xpdf for viewing pdfs, and the embedded
application opens a popup window, we end up with a shared appicon for
the embedded app that remains until Window Maker is restarted.
The underlying cause is that mozplugger winds up reparenting the
embedded app's original leader window to a subwindow of itself, so
wmaker's SubstructureNotifyMask on the root window no longer picks up
the DestroyNotify when that original leader is destroyed.
It seems easy to fix once you track down the problem: when fixing
several other properties in fixLeaderProperties(), add
StructureNotifyMask so we get DestroyNotify no matter where the leader
gets reparented to. A more targeted fix would only add
StructureNotifyMask when the fake group's origLeader is set, but I don't
think a few extra structure notifications are going to cause us any real
problems.
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
When an app hides its window but doesn't exit (e.g. apps that "minimize"
to the system tray), the highlighting was not being removed.
When alt-tabbing, the tabbed-to app's icon was not getting highlighted.
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
Autoconf uses multiple levels of variables when defining paths. For
example, ${datadir} by default is ${datarootdir}, which by default is
${prefix}/share, which by default is /usr/local. Substituting from
./configure, as is done by AC_DEFINE or AC_DEFINE_UNQUOTED, does not
expand all these variables. This was causing some of our defines to have
garbage like "${prefix}/share/pixmaps" rather than the intended
"/usr/local/share/pixmaps".
The solution is to generate the files needing these paths from the
Makefile rather than from ./configure, because make does fully expand
all those levels.
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
How to use:
- Install LCOV (http://ltp.sourceforge.net/coverage/lcov.php)
- AFAICT, compiler must be GCC.
- ./configure --prefix=/some/path --enable-lcov=/var/www
This will configure the sources so that generated coverage information
(HTML pages) will end up in /var/www/coverage-report. Choose a directory
you have write access to.
- make
No installation necessary (although it probably doesn't hurt to have
WM installed in ${prefix} so it can find resources and stuff, but the
build tree must be kept intact anyway).
- Put ${srcroot}/src, ${srcroot}/WPrefs.app and ${srcroot}/util first in
your path.
- Arrange for your .xinitrc or DM to start ${srcroot}/src/wmaker as your
window manager.
- Use it as you normally would, possibly for an extended period of time.
- make coverage.
This will create a tree of web pages under /var/www/coverage-report
- Further `make coverage's (after some more use) will re-generate the
report (deleting the directory first).
- `make coverage-reset' will reset execution counts to zero (see lcov(1)).
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
- Change the wusleep abomination to be a simple wrapper around
nanosleep (man says it's been POSIX for almost a decade)
- Remove autoconf tests that became unnecessary along the way
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
- on_exit is nowhere to be found in recent written history
- so there haven't for long been a system with !HAVE_ATEXIT
- so there is no need for either #ifdef HAVE_ATEXITs or configure
checks for atexit
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
An appicon is created for each group of windows, as specified by the
WM_HINTS window_group or the WM_CLIENT_LEADER. The "shared_appicon"
feature ignores the group leader specified by the application, replacing
it with a dummy leader matching the window's WM_CLASS. This causes
issues for dockapps, since each instance of a dockapp needs its own
appicon to display the different icon_windows, so shared_appicon is
automatically disabled for dockapp windows.
If the application creates some dockapp windows (no shared_appicon) and
some regular windows (with shared_appicon) with the same leader, it can
unexpectedly end up with two different appicons: one for the real group
leader it set and one for the fake leader created for shared_appicons.
Both of these appicons will try to use the same icon_window, which may
cause the dockapp window to suddenly lose its contents as they are moved
to the fake leader's appicon.
There is a simple fix: if a WApplication already exists (and has an
appicon) for the app-specified group leader window, disable
shared_appicon.
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
wsyserrorwithcode - Not used, no point either.
wsyserror->werror - qualifying "error" with a "type" hardly makes
sense if there are not at least two "type"s. There are not. Safe trip.
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
s/enviroment/environment/ both in the .c file and in all .po files that
already contain a translation for the string. The latter prevents
wrongly marking the translation as fuzzy.
The expansion of the macro wApplication{Dea,A}ctivate triggers an
implicit declaration warning for wIconSetHighlited. Add function
declararion to fix this.
On the one hand, libWINGs wasn't linking against -lX11 when it should
have been. And on the other, only libWINGs needs Xft, only wmaker needs
Xrandr, only wmaker and wmsetbg need Xinerama, only libwraster needs
Xmu, and -lpng may not need -lz.
Cleaning this up can help distributions get their dependencies correct,
and might even avoid loading the unused libraries at runtime, so we may
as well do it.
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
On BSD systems, strlcat and strlcpy are included in the C library and
nothing special is needed. On Linux systems they are not, but libbsd may
be available to provide them. Use it if so.
This also adds wstrlcat and wstrlcpy instead of trying to maybe-provide
strlcat and strlcpy themselves, as that way there is no risk of symbol
conflicts. Not bumping the library version at this time, that should be
done (if necessary) before release.
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>