This adds a small function which behaves exactly like libc's system(), but also
clears the masked signal set in the child process.
This is needed because libev 3.8 masks signals. :(
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
This adds a callback function which glib calls after it fork()'d and did all the
necessary setup. This callback function clears our signal mask.
This is necessary because libev 3.8 and later use signalfd and therefor have to
add those signals to the signal mask. Processes started through awesome would
inherit this signal mask and I can tell you, some app which ignores ctrl-c
confuses people a lot.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
This adds a new function spawn_proc_helper() which just contains a copy of
g_spawn_command_line_async()'s source code. This means that there should be no
behavior change at all here.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
Sometimes we unref the icon image, but we did not reset NULL, which
can make the client refering to a not-refed image.
Signed-off-by: Julien Danjou <julien@danjou.info>
if no file was found the string is just "\0" and neads a head
controled while
if no config file was found exit awesome with an error message
(fail early!)
Signed-off-by: Julien Danjou <julien@danjou.info>
In each widget's *_geometry function, two warnings were generated, e.g.:
warning: ‘geometry.y’ is used uninitialized in this function
warning: ‘geometry.x’ is used uninitialized in this function
Found by gogonkt with GCC 4.2.4 on gentoo.
Signed-off-by: Uli Schlachter <psychon@znc.in>
GCC 4.2.4 on gentoo:
awesome-3.3-rc3/mousegrabber.c: In function ‘luaA_mousegrabber_run’:
awesome-3.3-rc3/mousegrabber.c:37: warning: ‘root’ may be used uninitialized in this function
awesome-3.3-rc3/mousegrabber.c:37: note: ‘root’ was declared here
Thanks to gogonkt for reporting this.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Before this, a _NET_WM_ICON could have been 5 bytes long but still claiming
that the image it describes is 100x100 pixel in size.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
Verified to build with ImageMagick 6.2.4.
Signed-off-by: Johan Kiviniemi <devel@johan.kiviniemi.name>
Signed-off-by: Julien Danjou <julien@danjou.info>
Additionally, use the alpha channel so that the unfocused icons look
good on any background, not just black.
This adds ImageMagick as a build dependency.
Signed-off-by: Johan Kiviniemi <devel@johan.kiviniemi.name>
Signed-off-by: Julien Danjou <julien@danjou.info>
This replaces those repetitive calls to table.foreach() with one call to
awful.util.table.join() which gets passed all the tables returned from the
awful.key() calls.
Thanks to anrxc for testing this.
Signed-off-by: Uli Schlachter <psychon@znc.in>
My local config got a module which denies functions from adding new functions
to the global context or to a module's local context. I use this for catching
typos (think misspelled variable names).
This patch "fixes" a false-positive which was caused by this.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The _LDFLAGS vars which pkg_check_modules() set also include -L flags which
are necessary so that the linker can find the libs it needs to find.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The 'old' tr call produced garbled output with sun's tr.
The current common/tokenize.gperf file only uses a-z, 1-5 and _. Thus the
dropped conversions don't hurt atm. If they should ever become necessary again,
we need to find another, more portable way to doing this.
Thanks to evocallaghan aka Edward O'Callaghan for trying to build awesome on
SunOS and providing some hints on how to fix it.
Signed-off-by: Uli Schlachter <psychon@znc.in>
'sh -e' makes the shell script die if any command returns an error which isn't
caught. While this is a nice feature, this script doesn't actually need this.
Not using this shell feature makes the script more portable.
Thanks to Edward O'Callaghan aka eocallagha for stumbling upon this.
Signed-off-by: Uli Schlachter <psychon@znc.in>