This tests are not-really-good because they are overly specific. They
test for the current behaviour of the implementation, but I guess that a
valid implementation could also behave slightly different. However, for
now this will have to be enough.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Previously, when gears.geometry.rectangle.get_intersection() was called
with two non-intersecting rectangles, it would return a negative
width/height.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit changes the systray widget, wibox.drawable and the C code to
fix the following bug: When the systray widget is removed from a
drawable without being moved somewhere else, the systray stayed visible.
This was because the systray is not drawn by awesome, but only placed.
When the widget is no longer "drawn", it stays wherever it was placed
last.
This change works by detecting the situation when the systray is
removed. Then, the C code is specifically told to remove the systray
window from the drawable.
Note that this is only a partial fix. This change works correctly when
the widget is removed completely, because it is no longer placed by its
parent widget. However, for example, when you do
wibox.widget.systray().visible = false, the effect is just that the
systray widget gets size 0x0. This is not really visible, but as far as
this change is concerned, the widget is still part of the drawable.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This adds new code so that we can count how often a specific widget is
visible inside of all widget hierarchies.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This was broken in 9cb60b8 in PR #1597 (from myself).
focus() is not defined on the screen instance as method
but on the screen module as function.
Signed-off-by: Christoph Mertz <chris@nimel.de>
Fix#1644
* Move table functions out of awful.util into new gears.table
* travis: Use v9999 prefix for full requests
Make sure no newly deprecated functions are used
* Move all `awful.util.table.*` calls to `gears.table.*` calls
Move table test functions from awful/util_spec to new gears/table_spec
Change awful.util.subsets call to gears.math.subsets in awful/key.lua
In awesome 3.5, the default themes set a global variable called "theme".
This was, I think, not intentional and we changed this when luacheck
found this issue. However, the "my first awesome" document from the old
wiki made use of this fact and so many people were using this hack. This
commit fixes our copy of "my first awesome".
Signed-off-by: Uli Schlachter <psychon@znc.in>
This adds a new widget that displays the icon of a client. This widget
tries to use the best fitting of the available icons.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This adds c.icon_sizes which is a table containing the width and height
of each available icon. With c:get_icon(i), Lua can query the i-th icon
as a lightuserdata.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Clients can provide various icons in their _NET_WM_ICON property. Up to
now we only saved a single one, now we save all of them.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This makes the scroll and only_on_screen widgets appear in the widget
lists. The examples are not really helpful, but Elv13 told me to add
them. Also, only_on_screen is in awful.widget, but now something in
tests/examples/wibox/container refers to it...
Signed-off-by: Uli Schlachter <psychon@znc.in>
The $XDG_DATA_HOME environment variable may not necessarily end in a
slash, so insert it when generating the list of all menu dirs to make
sure the directory can be found.
This extracts the code for finding the next screen
from focus_bydirection to a separate method on
the screen object.
The main reason was to use the finding code without
actually changing the screen focus but this should
incidentally make the code slightly easier to test
as well since both concerns can be tested in
isolation.
Signed-off-by: Christoph Mertz <chris@nimel.de>