This accidentally called the draw callbacks with a nil argument instead of the
context. This was introduced in some badly done rebase, sorry! :-(
Signed-off-by: Uli Schlachter <psychon@znc.in>
The default config has this:
awful.key({ modkey, }, "o", awful.client.movetoscreen ),
This moves the client to the next screen and focuses that screen.
But it does not ensure that the client is raised above any existing
windows, e.g. when moving a floating client.
This patch emits the `request::activate` signal if the client is
currently focused, but only if the screen property actually has changed.
Closes https://github.com/awesomeWM/awesome/pull/98.
The parent was needed for :get_matrix_to_device() which recursively walked
parents and multiplied together their transformation matrices. This is now
replaced by calculating all these matrices while constructing the hierarchy.
Signed-off-by: Uli Schlachter <psychon@znc.in>
There once was a function :get_root() on hierarchies, but that wasn't needed any
more and thus was removed. This commit also removes the internal code that was
used to record the root element of the hierarchy.
Signed-off-by: Uli Schlachter <psychon@znc.in>
These caches, well, cache the result of the :layout and :fit callbacks on
widgets.
Clearing caches is done by recording dependencies between a widget. When a call
to base.fit_widget() or base.layout_widget() recursively causes another call to
such a function, this means that the earlier widget depends on the later widget.
This dependency is recorded and when the later widget emits
widget::layout_changed, the caches of all the widgets involved are cleared.
Signed-off-by: Uli Schlachter <psychon@znc.in>
A widget hierarchy describes the position of widgets. The hierarchy is a
recursive tree of widget hierarchy instances. This functionality depends on a
:layout function that is not yet implemented on widgets, but will be added
later.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This factors out `matches` and uses it in `matches_list` (renamed
from `does_match`) to short-circuit the successful case - where not all
rules have to get checked.
Closes https://github.com/awesomeWM/awesome/pull/431.
This new function spawns a program, similarly to awful.spawn, but captures its
output. On each line of output on stdout / stderr, a Lua function is called with
this line. There are different callbacks for stdout and stderr. When both stdout
and stderr are closed, another callback function is called. The intention for
this last callback is "the program is done", because most programs should only
close their output when they exit.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This allows the "label" callback to adjust the textbox itself.
`tasklist_label` is changed to make use of it and supports new style
arguments: `font_focus`, `font_urgent` and `font_minimized`.
Closes https://github.com/awesomeWM/awesome/pull/313.
After this change, fit_widget() enforces that a widget cannot ask for more space
than was offered to it. This also fixes a rounding issue in the flex layout
where its fit function would return too small numbers.
Thanks to this, lots of "XXX" comments in spec/ disappear.
Signed-off-by: Uli Schlachter <psychon@znc.in>
In expand nodes "none" and "outside", the variable size_remains describes how
much space is available for the first/third widget. Everything else is used by
the second widget. Thus, fitting the second widget to anything involving
size_remains is wrong. Instead, this commit uses the correct value.
This also fixes a messed up argument order for horizontal align layouts.
Signed-off-by: Uli Schlachter <psychon@znc.in>