Not only does every va_start() need a corresponding va_end(), this is
also true for va_end(). Thus, buffer_addvf() needs to call va_end().
Found by Codacy.
Signed-off-by: Uli Schlachter <psychon@znc.in>
It might be well known that test-menubar.lua fails with "cannot do calls
on non-normal thread" when run under our Lua 5.3 build with coverage
tracking enabled. This new, extra assertion catches the error earlier
and in a different way. Since more assertions means more errors caught,
let's add this.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The code in menubar.icon_theme naively implements the algorithm from the
base dir specification. This is a problem: On this system,
/usr/share/icons/{Adwaita,hicolor}/index.theme list 91, respectively 649
subdirectories. Since we check for three file extensions (png, svg,
xpm), this means that a failing icon lookup for the Adwaita theme checks
for (91+649)*3 = 2220 files (in practice it might be a bit better since
the directories have specific meanings, but still). That's insane.
Since we only use this code for looking up category icons anyway, just
deprecate this mess. Category icons are now looked up in the same way
that icons for individual applications are looked up.
Since menubar.init does not require("menubar.icon_theme"), this means
that menubar.icon_theme is no longer actually loaded. That's bad.
(Hopefully) Fixes: https://github.com/awesomeWM/awesome/issues/1496
Signed-off-by: Uli Schlachter <psychon@znc.in>
This is a slight API break, but should not cause many problems for
people. This makes parse_desktop_file() handle the type of keys
correctly, so that e.g. booleans are actually parsed as booleans. Also,
locale-sensitive entries are now looked up in a way that obeys the
current locale.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This replaces our own, hand-written parser of desktop files with the one
that GLib provides. No functional changes intended.
Signed-off-by: Uli Schlachter <psychon@znc.in>
_NET_WM_STATE could contain _NET_WM_STATE_HIDDEN, which we interpret as
minimized. Minimized clients have WM_STATE set to WM_STATE_ICONIC, but
the code in client_manage() would later overwrite this to
WM_STATE_NORMAL.
Fix this by setting the initial WM_STATE_NORMAL by doing so before
processing _NET_WM_STATE.
Fixes: https://github.com/awesomeWM/awesome/issues/2095
Signed-off-by: Uli Schlachter <psychon@znc.in>
If a tag is specified by name, but no such tags exist, awful.rules would
cause an error (attempt to index a nil value). Fix this and add a test
for this case.
Fixes: https://github.com/awesomeWM/awesome/issues/2087
Signed-off-by: Uli Schlachter <psychon@znc.in>
`"(@D)"` is the dir of the target, i.e. "build" for BUILDDIR=build,
which results in calling `cmake build ..`.
cmake appears to ignore the "build" in this case, and works the same way
without it.
Instead of ".." this patch uses `$(CURDIR)`, which is the absolute path
to the source dir, which is relevant in case `BUILDDIR` is not just a
direct subdirectory.
Calling `make dist` on a dirty tree caused an error when trying to use
`git log` with the `-dirty` suffix.
This patch removes any "-dirty" suffix from the argument.
[ci skip]
LUA_COV_RUNNER is used with `add_custom_command` for the command to
generate the images, and AWESOME_THEMES_PATH should be set there.
Since LUA_COV_RUNNER is used also with `execute_process` there is no
need for `set(ENV …)` anymore.