The default config had tables like mywibox and mywibox[s] was the wibox
that is visible on screen s. When a screen is removed, nothing cleans up
these tables and so the screen and the wibox could not be garbage
collected. The same applies to the layoutbox, taglist etc.
This commit removes the global mywibox table and instead saves it as a
property on the screen. This way, the screen is not explicitly
referenced and when it is removed, the screen, its wibox and all of its
widgets become unreachable and can be garbage collected.
This commit also updates the docs and the tests that referenced things
(mostly the wibox) via mywibox[s] to now use s.mywibox.
Fixes: https://github.com/awesomeWM/awesome/issues/1125
Signed-off-by: Uli Schlachter <psychon@znc.in>
The magnifier layout wants to ignore floating clients. Before 82342f0 this was
done by calling awful.client.floating.get(focus). If "focus" was nil, this might
have checked the floating status of a wrong client (if some other client was
focused, and the code in magnifier set focus=nil before). This issue can easily
be missed and might exist since forever. After 82342f, floating status is
checked via "focus.floating" and this now causes an "attempt to index nil value"
error instead. Much easier to notice.
Fix this by adding the missing nil check and while touching the code, merge this
with the previous "if" and correct another error (the wrong thing happened if we
had #cls=0).
Fixes: https://github.com/awesomeWM/awesome/issues/1103
Signed-off-by: Uli Schlachter <psychon@znc.in>
A client is supposed to go to a screen when:
* It has been started using `awful.spawn` with explicit instructions [1]
* An `awful.rules` rule **or any of its callbacks** set the screen [2]
* When something handle `request::screen` and/or `request::tag` in some
custom ways. [3]
* Some clients can request a screen and mean it (like MythTV/Kodi/XBMC and
some multi-window DAW) [4]
A client is supposed to go to the focused screen when none of the above are
true [5].
Other constraints:
* The screen need to be set only once, anything will will emit
`property::screen` many time and cause side effects.
* There has to be a single entry point to the algorithm, no multiple
"manage" handler.
* Awesome internals must use the `request::` signal API and not force
their decision outside of request handlers.
* Restarting Awesome must not change the client screen
Commit 2178744 fix use case number [1] and [2]. It actually fix [4] too, but
it is an accident and I am not sure we care about [4] anyway. Use case [1]
and [2], however, are very important.
Fix#1091
The geometry storage has been moved into awful.placement. This
code was never executed as data[] was never populated.
There is some behavior that is indeed lost, but it is unlikely
someone will ever notice (it has been broken for 6 months).
The previous code attempted to handle scrren changes while
maximized. The new code organization shift this responsability
to awful.placement. However, it doesn't yet fully implement the
previous logic.
Awesome 3.5.9 accepts `_active`/`_inactive` names for `beautiful`
minimize keys (such as "titlebar_minimize_button_focus_inactive").
Some themes rely on those, meaning that when they loaded under
the current Git, the minimize button went missing. This adds a
fallback, to improve compatibility with the existing themes.
This commit remove the `awful.tag` "manage" hook. The relevant
code has been moved to ewmh.lua request::tag handler. The handler
is called either by a volontary screen change or by a forced one.
It also require the awful.rules to be executed. This is done by
default and the user would have to explicitly disable that
behavior. From now on, disabling the rules require the user to
handle tag selection.
Fixes#1028#1052
There was still a problem that caused the "old" tags to be
inserted in the wrong position when "saved" from a screen being
removed.
Also, this use a :get_tags(true) to save an uneeded sorting pass.
The index was updated on an unordered table. As the elements
order did not match the relative indices once they have been
changed, further calls to set_index produced garbage.
The default taglist didn't notice because it use screen.tags
table index instead of the tag index. A debug using
echo 'for _,t in ipairs(mouse.screen.tags) do
print("INDEX:", _, t.index, t.name) end' | awesome-client
Would have shown two or more elements with the same index. To
debug issues related to tag indices, this bash script can be
enabled:
while true; do
echo 'for _,t in ipairs(mouse.screen.tags) do
assert( _==t.index) end' | awesome-client
sleep 0.5
done