Let's just save the systray atom and keep it around. Why should we redo this
every time this atom is needed?
Signed-off-by: Uli Schlachter <psychon@znc.in>
Use lua's *integer instead of *number functions, because we are dealing with
integers. That is, "numbers which do not have a fractional part".
Also some minor fixup for some comments.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Every .c file has to include the corresponding .h file first to make sure the
headers are self-contained. Additionally, this moves some unneeded includes
around.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This option is no longer valid in modelines, so it has been removed from
all modelines using the following shellscript:
#!/bin/ksh
git ls-tree -r HEAD | cut -f2 | while read f; do
egrep -e '^(//|--) vim: .*encoding=' $f >/dev/null || continue
sed -E -e '/^(\/\/|--) vim:/s/:encoding=utf-8//' $f > /tmp/foo
mv /tmp/foo $f
done
Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
xcb-util is now split into several repositories since 0.3.8. This
release also cleaned up the API a lot, thus update the code
accordingly.
Signed-off-by: Arnaud Fontaine <arnau@debian.org>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Every time the systray was updated, we reparented the systray window to its
drawin. However, when the systray was already reparented, this still caused it
to be unmapped and mapped again.
So, we only should reparent the systray when we have to, and not always just for
the lulz.
Signed-off-by: Uli Schlachter <psychon@znc.in>
All windows which use globalconf.default_depth must also have a backpixel,
borderpixel and colormap set when they are created. Without this, all these
xcb_create_window() calls would fail when globalconf.default_depth is no longer
the screen's default depth.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This makes awesome support only a single X11 protocol screen. If you are still
using zaphod mode, you can run multiple instances of awesome on the single
screens, e.g.:
DISPLAY=:1.0 awesome & DISPLAY=:1.1 awesome &
Signed-off-by: Uli Schlachter <psychon@znc.in>
When an X11 client disconnects from the X server, all of its windows are
destroyed. This also means that all the sub-windows of those windows are
destroyed which is not necessary what one wants to happen.
To work around this, X11 has a "save-set". All the windows that are in the
save-set are reparented to their closest ancestor when they would normally be
destroyed. This is just what this code needs. :)
(The windows in the save-set are also mapped when they are saved, dunno if this
hurts here or not)
Signed-off-by: Uli Schlachter <psychon@znc.in>
Pretty much every single source file needs this struct, so it makes sense to
define it in a common header instead of in every single .c file.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>