wibox.layout.base: Use math.min/max

Signed-off-by: Uli Schlachter <psychon@znc.in>
wibox.layout.rotate: Add some good constructor arguments

Signed-off-by: Uli Schlachter <psychon@znc.in>
Fix mouse.object_under_cursor() with drawins

This was telling lua that no results are to be returned, but still tried to
return something. Thus, lua ignored the result.

Signed-off-by: Uli Schlachter <psychon@znc.in>
awful.tooltip: Don't place tooltips when text changes

The tooltip is now only placed when it is made visible, not while it is
invisible.

Signed-off-by: Uli Schlachter <psychon@znc.in>
awful.screen.getbycoord(): Always return a valid screen

No callers expect a nil result from this function. In fact, this broke
awful.tooltip because it tried to get the workarea of screen nil.

Signed-off-by: Uli Schlachter <psychon@znc.in>
wibox.layout: remove unnecessary wrapping of draw and fit functions

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
wibox.layout.flex: fix the fit function

The fit function of the flex layout is different from the fixed.fit one.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
wibox.layout.align: don't take up all space in the other axis

This adds a fit function to the align layout that makes sure that
the layout will not take up all the available space in the other
axis than it's direction. Eg. for horizontal align layout, it will
only take up the maximum of its widgets' heights in the vertical axis.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
wibox.layout.align: make the middle widget really centered

Centers the middle widget in the align layout in the remaining space
left by the widgets on the sides.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
{tag,task}list: add update_function and base_widget constructor arguments

The arguments are optional, making it possible to use a custom function
to create the {tag,task}list layout. The base_widget arguments can be
used to override the base layout of the {tag,task}list widget.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
wibox.layout: add a new constraint layout

This layout can be used to constraint the size of the widget it holds.
Depending on the strategy passed to it, the widget will have a minimum,
maximum or exact size that was set through this layout.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
tasklist: add a theme option for a plain task name

If theme.tasklist_plain_task_name is set to true, the various client
state marks will not be prepended to the task name.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
awful.widget.common: remove unsed function

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>