We called the keygrabber and told Lua we are expecting one return value, so Lua
will always get us one return value on the Lua stack. However, when an error
happens, nothing is pushed on the stack, but we still tried to pop the return
value. This corrupted the Lua stack.
The easiest fix is to just not ask for a return value that is not used anyway.
Not adding a test for this, because the test has to cause a Lua error which the
C code will then log to stderr and the test runner considers this a test
failure...
Fixes: https://github.com/awesomeWM/awesome/issues/735
Signed-off-by: Uli Schlachter <psychon@znc.in>
When e.g. test-leaks.lua fails, it will cause a Lua error before starting the
test runner. This means that the test will just hang, because nothing causes
awesome to quit.
Handle this by starting a timer when the test runner is loaded and quitting
awesome in there if no test run was started yet. This only works if all tests
load the runner before doing anything that could fail, so the require("_runner")
is moved to the beginning in every test.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This makes it possible to have the systray only visible on the primary screen,
which is the new default value. This also makes it possible to configure
directly on which screen the systray should be visible.
This breaks the API in the sense that people who use "the old method" to
configure the systray's screen possibly don't have a systray.
Fixes: https://github.com/awesomeWM/awesome/issues/724
Signed-off-by: Uli Schlachter <psychon@znc.in>
There's no point in having multiple instances of this, because there are no
per-instance settings and the systray can only be visible in a single place at a
time anyway.
Signed-off-by: Uli Schlachter <psychon@znc.in>
* Better widget names when using the declarative syntax
* Add ratio.get_ratio to avoid using the private API
* Also support `set_widget` when swapping widgets
Issues involve:
- :layout() had the wrong signature and expected a cr argument that was left
from when this was still the :draw() function.
- horizontal and vertical reflection were mixed up (I guess it has always been
this way?)
- The return value should be a table of widget placements. Instead it was just a
single widget placement.
This is broken since commit 85ab3f045b.
Fixes: https://github.com/awesomeWM/awesome/issues/718
Signed-off-by: Uli Schlachter <psychon@znc.in>
The documentation states that this function returns nil if the property does not
exist, but it actually returned nothing. And yes, in Lua this is a difference...
There seem to be a little race condition (either in my layout code or
elsewhere) when playing with multiple screens. As most properties do
not depend on the tag, there is no point in returning early anyway.
Instead of true/false `merge` can be a callback now, which allows for
more dynamic handling of the client not being visible, e.g. moving it to
the current tag, instead of merging.
It was missing apps/entries from /usr/share/applications/kde4.
This patch also makes sure that entries are unique (by Exec/Name).
Closes https://github.com/awesomeWM/awesome/pull/711.
Wallpapers are usually big images that use up a lot of memory. This commit makes
gears.wallpaper call :finish() on all involved surface to make them free their
memory.
This is a lot faster than waiting for the garbage collector to collect these
surfaces. Due to the large size of wallpapers, such a special case makes sense
for this code.
Hopefully-helps: https://github.com/awesomeWM/awesome/issues/368
Signed-off-by: Uli Schlachter <psychon@znc.in>
Loading a file normally has the same behaviour as before. First the cache is
checked and if nothing is found, the file is loaded and cached.
This commit changes the behaviour of loading a file uncached. This no longer
removes the file from the cache if it is cached (why should it?) and also does
not put it in the cache.
This means that users of load_uncached and load_uncached_silently can now freely
modify the resulting surface without interfering with other API users.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This makes awful.tooltip create its tooltip lazily when it is first needed
instead of immediately when the tooltip is created.
Fixes: https://github.com/awesomeWM/awesome/issues/591
Signed-off-by: Uli Schlachter <psychon@znc.in>