1408e8b952
Run the following code: do local d local f = function() d.visible = true end if _VERSION >= "Lua 5.2" then setmetatable({}, { __gc = f }) else getmetatable(newproxy(true)).__gc = f end d = drawin({}) end collectgarbage("collect") Awesome will segfault. The reason for this is that after the above code ran, all variables in it are unreferenced and will be garbage-collected at the next sweep phase. Lua runs garbage collectors in the inverse order that their corresponding objects were "marked" which means for the above code that the drawin's garbage collector will run before function f runs. So the code will access the drawin after its destructor already ran. Obviously, awesome's C code does not expect nor correctly deal with this situation and was dereferencing a NULL pointer. To fix this, this commit "unsets" the metatable of a userdata object when it is being garbage collected. Since the type of a userdata is inferred via its metatable, the object will no longer be accepted by luaA_toudata(). For the above code this will result in an unhelpful error message saying that something tried to index a userdata, but userdata cannot be indexed. At least we no longer crash and the traceback of the error will hopefully point at some __gc metamethod which should be enough of a hint to figure out the problem. Thanks-to: http://blog.reverberate.org/2014/06/beware-of-lua-finalizers-in-c-modules.html Signed-off-by: Uli Schlachter <psychon@znc.in> |
||
---|---|---|
build-tests | ||
build-utils | ||
common | ||
docs | ||
icons | ||
lib | ||
manpages | ||
objects | ||
spec | ||
themes | ||
utils | ||
.gitignore | ||
.travis.yml | ||
CMakeLists.txt | ||
LICENSE | ||
Makefile | ||
README.md | ||
awesome-version-internal.h.in | ||
awesome.c | ||
awesome.desktop | ||
awesome.doxygen.in | ||
awesome.h | ||
awesomeConfig.cmake | ||
awesomerc.lua.in | ||
banning.c | ||
banning.h | ||
color.c | ||
color.h | ||
config.h.in | ||
dbus.c | ||
dbus.h | ||
draw.c | ||
draw.h | ||
event.c | ||
event.h | ||
ewmh.c | ||
ewmh.h | ||
globalconf.h | ||
keygrabber.c | ||
keygrabber.h | ||
luaa.c | ||
luaa.h | ||
mouse.c | ||
mouse.h | ||
mousegrabber.c | ||
mousegrabber.h | ||
property.c | ||
property.h | ||
root.c | ||
selection.c | ||
selection.h | ||
spawn.c | ||
spawn.h | ||
stack.c | ||
stack.h | ||
strut.c | ||
strut.h | ||
systray.c | ||
systray.h | ||
xkb.c | ||
xkb.h | ||
xwindow.c | ||
xwindow.h |
README.md
Readme
About awesome
awesome is a highly configurable, next generation framework window manager for X.
Building and installation
After extracting the dist tarball, run:
make
This will create a build directory, run cmake in it and build awesome.
After building is finished, you can install:
make install # you might need root permissions
Running awesome
You can directly select awesome from your display manager. If not, you can
add the following line to your .xinitrc to start awesome using startx
or to .xsession
to start awesome using your display manager:
exec awesome
In order to connect awesome to a specific display, make sure that
the DISPLAY
environment variable is set correctly, e.g.:
DISPLAY=foo.bar:1 exec awesome
(This will start awesome on display :1
of the host foo.bar.)
Configuration
The configuration of awesome is done by creating a
$XDG_CONFIG_HOME/awesome/rc.lua
file.
An example configuration named awesomerc.lua.in
is provided in the source.
Troubleshooting
In most systems any message printed by awesome (including warnings and errors)
are written to $HOME/.xsession-errors
.
If awesome does not start or the configuration file is not producing the desired results the user should examine this file to gain insight into the problem.
Reporting issues
Please report any issues you may find on our bugtracker. You can submit pull requests on the github repository. Please read the @{02-contributing.md} guide for any coding, documentation or patch guidelines.
Status
License
The project is licensed under GNU General Publice License v2 or later. You can read it online at (v2 or v3).