Commit Graph

9 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee 20743a9a16 Remove all usage of the now deprecated `awful.rules`. 2020-01-19 02:59:10 -05:00
Emmanuel Lepage Vallee 04c757322c client: Turn `rc.lua` logic into a new `request::border` signal.
The default `rc.lua` was using the focus/unfocus signals to set
the border color along with `awful.rules`. This logic block was
no longer aligned with the rest of `rc.lua` since it was
the only place where `beautiful` variables where only used by
`rc.lua`.

On top of this, the new request handler also has extra contexts
for the urgent and floating/maximixed use cases. So it can be used
by themes to implement much smarter borders than just focus based
ones. They were previously limited by the fact most of the
(un-monkey-patchable) logic was in `rc.lua`.

Note that this commit also shuffle the awful.rules order between
the titlebar and the border and changes the tests accordignly.
After some consideration, I came to the conclusion the previous
behavior was bogus and the fact that the placement tests required
to know about the titlebar height is simply a proof of that. The
change was required in this commit because since the border is no
longer in the default rules, a new buggy edge case surfaced.
2020-01-11 15:43:11 -08:00
Sergey Vlasov 51e823832c test-awful-placement: Test no_overlap with unselected tags (#2809)
Test the behavior of awful.placement.no_overlap when placing clients on
unselected tags.  Currently this tests only the most common case with
only a single selected tag and a single tag set for each client.

Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
2019-07-04 16:43:30 +03:00
Sergey Vlasov c48d2e5a70 test-awful-placement: s/window/client/g
Use the "client" term consistently instead of using "client" in code and
"window" in comments.

Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
2019-07-04 16:42:15 +03:00
Sergey Vlasov ec8edaf9d5 test-awful-placement: Test no_overlap with sticky clients
Clients which are sticky should be taken into account by
awful.placement.no_overlap even if they seem to be on a different tag;
add a test to verify this behavior.

Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
2019-07-04 16:42:15 +03:00
Sergey Vlasov b6c7e6751a test-awful-placement: Test no_overlap with hidden and minimized clients
Clients which are hidden or minimized should be ignored by
awful.placement.no_overlap; add a test to verify this behavior.

Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
2019-07-04 16:42:15 +03:00
Sergey Vlasov 1c27f9d227 test-awful-placement: Reindent after the previous change
Only whitespace changes and reformatting of comments.

Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
2019-07-04 16:42:15 +03:00
Sergey Vlasov 9e894d8fdd test-awful-placement: Make the test repeatable
In order to test the behavior of awful.placement.no_overlap with
unselected tags, the test sequence must be able to run multiple times.
Fix the test code to make this possible (currently it just performs the
same sequence 3 times, the code to actually test the behavior with
different tags will be added later).

Indentation is unchanged to make the changes obvious in diff; the next
commit will contain formatting changes without anything else.

Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
2019-07-04 16:42:05 +03:00
Sergey Vlasov 16b5803fda Add a test for awful.placement.no_overlap+awful.placement.no_offscreen
Test that the placement function used in the default configuration
behaves as intended.  This test was failing before the no_overlap and
no_offscreen fixes in two previous commits.

Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
2018-09-13 08:23:36 +03:00