Print libxcb error codes for broken connections

Signed-off-by: Uli Schlachter <psychon@znc.in>
tasklist: Add default colors for broken themes

In case loading the theme failed and we don't have fg_normal or bg_normal, add
default values for these properties. All the other colors are only used if they
are defined, but these two always need to be defined.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Really ignore loops in transient_for (FS#1124)

The code in property_update_wm_transient_for() looked at the transient_for
relation before the new transient got set. However, the code is supposed to
check if we get a loop after introducing this new transient_for.

Thus, if we arrive back at the client that we started from, we can be sure that
there is a cycle. Signal this by setting the loop counter high enough to abort
the loop and make the rest of this function do nothing.

No idea how I missed this case before nor why I cannot reproduce this on debian,
but can reproduce it on Arch just fine.

Reported-By: Kasimir Knallkopf at http://article.gmane.org/gmane.comp.window-managers.awesome/10415
Signed-off-by: Uli Schlachter <psychon@znc.in>
awful.tag.delete: Deactivate tags

The activated property was added to tag objects between awesome 3.4 and 3.5.
This is used in the C code to keep tags alive even when nothing else refers to
it and includes a tag e.g. in some root window properties.

Thus, to get rid of a tag and to make the C code drop its reference to it, we
have to set activated to false in this function.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Merge branch 'master' of git://git.naquadah.org/awesome
Merge branch 'master' of git://git.naquadah.org/awesome into dev
Merge branch 'dev'
taglist: Add [bg|fg]_empty

Signed-off-by: Uli Schlachter <psychon@znc.in>
menu: do not double escape name in 'menu:clients()' (FS#1202)

Label of menu entries will be escaped automatically.  Doing it manually
in menu:clients() will escape it it twice.

Patch removes the util.escape() call in menu:clients()

Signed-off-by: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
awful.menu: Add missing "local" declaration

Signed-off-by: Uli Schlachter <psychon@znc.in>
menubar: Fix API docs

ldoc wants documentation comments to start with "---", not just "--".

Signed-off-by: Uli Schlachter <psychon@znc.in>
awful.tag.viewmore: Make screen optional (FS#1203)

The documentation says that screen, the last argument to viewmore(), is an
optional argument. However, the implementation only treated it as an optional
argument in one place.

Fix this by always setting the screen variable itself to a screen.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Finish C-side support for window shapes (FS#1051)

A drawin's and a client's bounding and clip shape can now be queried and is
returned as a cairo surface.  Also, a client window's shape (e.g. xeyes setting
its own shape) can be queried via c.shape_client_bounding and
c.shape_client_clip.  All of these properties now emit signals when changed.

(This also silently fixes a bug in luaA_drawin_set_shape_bounding() which forgot
to include the drawin's border in its size calculation)

Signed-off-by: Uli Schlachter <psychon@znc.in>
awful.menu.clients: Fix API (FS#1200)

This gets rid of the unused first argument and adds a new second argument that
can influence individual items.

Signed-off-by: Uli Schlachter <psychon@znc.in>
awesomerc: Fix set menu clients width (FS#1200)

Signed-off-by: Uli Schlachter <psychon@znc.in>
awful.menu.clients: Remove useless line (FS#1200)

Signed-off-by: Uli Schlachter <psychon@znc.in>
wibox.layout.margin: Add margins color parameter

This adds a :set_color() method so that the margin layout can color the margins,
drawing a bordered widget.

Signed-off-by: Uli Schlachter <psychon@znc.in>
layouts: spiral: Avoid gaps between windows

When an area is split in two, for example horizontally, one of the windows
should have height math.floor(previous height / 2) and the other
math.ceil(previous height / 2), to be certain that no gaps are left between the
windows.

For instance, if the first window has height h and the second window has height
math.floor(h / 2), the height of the third window should be math.ceil(h / 2)
instead of the same as for the second window.

So to compute the size of window n + 1 it’s necessary to remember the size of
window n - 1 as well as that of window n.

Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
prompt: fix search term ctrl+up/ctrl+down when starting from existing entries

Signed-off-by: Massimiliano Brocchini <massimiliano.brocchini@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
prompt: search in prompt history using exact string match

The default value for the second argument to :find() is 1, so nothing is changed
here. The third arguments disables pattern matching and instead gets us literal
interpretation of strings. This means that pattern characters like e.g. [, ] and
. don't get interpreted.

Signed-off-by: Massimiliano Brocchini <massimiliano.brocchini@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>