The return value for this function is used as an index in a table and
Lua does not like nil as an index.
The function that actually looks for icons, find_icon_theme() already
falls back to "hicolor" if it does not find anything via the current
theme, so fix this issue by just falling back to "hicolor" here as well.
Fixes: https://github.com/awesomeWM/awesome/issues/1819
Signed-off-by: Uli Schlachter <psychon@znc.in>
The documentation for awesome.register_xproperty, awesome.get_xproperty
and awesome.set_xproperty were lost in commit 26f15a13f3. This
commit adds them back.
Fixes: https://github.com/awesomeWM/awesome/issues/1817
Signed-off-by: Uli Schlachter <psychon@znc.in>
Previously, the lgi check used the normal Lua interpreter to check if
lgi is installed. However, nothing ensures/requires that awesome is
built against the same Lua version as the Lua interpreter. This means
that if lgi is only available for some Lua version, then the check could
succeed even though awesome would later fail to start. Also, the check
might have failed even though awesome would not have any problems
finding lgi.
This commit replaces lgi-check.sh by a small C program which does the
same thing. This ensures that the same Lua version is used as awesome
will be using.
There are some places that still use the Lua interpreter: Example tests
(run through the Lua interpreter directly) and unit tests (run through
busted). For unit tests, this should not make much of a difference and
example tests might later get similar treatment.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This makes sure that the liblua.so that we built actually depends on the
libraries that it needs (libm and libdl). Previously we already tried
this, but specified "-ldl" at the beginning of the command line. Since
nothing needed this library yet, the linker just ignored it.
Signed-off-by: Uli Schlachter <psychon@znc.in>
LGI's async support was trying to yield inside a protected call. Lua 5.1
cannot do that. Work around this by reverting to the behaviour before
commit 50cfa6c: Only call the callback in a protected context.
Fixes: https://github.com/awesomeWM/awesome/issues/1837
Signed-off-by: Uli Schlachter <psychon@znc.in>
Just re-arranging on every focus change would cause useless/needless
re-arranges (which have no effect except to waste CPU time). Thus, this
adds a special (undocumented) flag on layouts that makes sure that a
rearrange occurs when the focus changes.
Fixes: https://github.com/awesomeWM/awesome/issues/1799
Signed-off-by: Uli Schlachter <psychon@znc.in>
This makes sure that all sizes that are specified in themes go through
the dpi() function. For most themes this just means that the value 0 is
DPIfied, which should not make much of a difference. However, for
zenburn this actually adds the very first calls to dpi() to this theme.
Fixes: https://github.com/awesomeWM/awesome/issues/1807
Signed-off-by: Uli Schlachter <psychon@znc.in>
Commit e54361a374 added code so that we pass the list of
currently running children across restart via an environment variable.
As Colin Walters correctly points out, setenv() is not safe in a
multi-threaded processes.
Thus, instead of using the environment, use the command line to pass
this information along.
https://github.com/awesomeWM/awesome/issues/1812
Signed-off-by: Uli Schlachter <psychon@znc.in>
Before this, we used a_exec() with started a shell and used it to parse
our glued-together command line. That only asks for escaping trouble
(think: Path to the config file is given on the command line and
contains a space), so use execvp() directly.
Signed-off-by: Uli Schlachter <psychon@znc.in>
In Unix, so that a process can learn about the exit status of the child
processes that it started, children become zombie processes until the
parents collects their exit information. We use glib both for starting
and for collecting processes. However, when awesome is restarted, the
new instance inherits children, but does not know about them and does
not inherit them.
Fix this by explicitly tracking a list of running child processes and by
serialising them across a restart via an environment variable. The new
awesome instance can then watch for these child processes, but besides
that it ignores them and does not use their exit status in any way.
Thanks to Colin Walters for the hint with serialising the list of processes.
Fixes: https://github.com/awesomeWM/awesome/issues/1193
Signed-off-by: Uli Schlachter <psychon@znc.in>
Previously, running make in the build/ directory depended on the "cmake"
target which was running the cmake command. This target was phony,
meaning that it was always considered to be out of date and needed to be
re-generated.
Change this so that instead things depend on the CMakeCache.txt file. If
that file is already there, we do not re-run cmake.
Signed-off-by: Uli Schlachter <psychon@znc.in>