Commit Graph

384 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallée 09bd3ec67a Merge pull request #1872 from Elv13/upstream_dynamic_p8
Import some commits from the stateful layout branch
2017-06-27 03:54:12 -04:00
Uli Schlachter 19fbae7f74 test-menubar.lua: Also skip the test with LuaJIT
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-27 08:58:17 +02:00
Uli Schlachter 914b4b7c8b test-menubar.lua: Filter calls to gears.debug.print_error
A test counts as having failed if it prints any error. However, the
search path can very well contain non-existing directories which are not
a problem. Thus, handle this by monkey-patching gears.debug.print_error.

Ref: https://github.com/awesomeWM/awesome/pull/1872#issuecomment-311224439
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-27 08:54:03 +02:00
Luke Bonham 547c0e4b83 awful.spawn: add easy_async_with_shell and fixed easy_async doc (#1541) 2017-06-26 21:15:58 +02:00
Emmanuel Lepage Vallee 82d1616773 tests: Add tests for the stack layout 2017-06-26 02:27:20 -04:00
Emmanuel Lepage Vallee e49e7d6938 shims: Add a missing drawin member 2017-06-26 02:27:20 -04:00
Emmanuel Lepage Vallee 458340b4d4 doc: Add examples for the ratio layout 2017-06-26 02:27:20 -04:00
Uli Schlachter c9c02aef67 tests: Disable test-menubar.lua where needed
This test runs into an lgi bug that causes awesome to segfault. Work
around this by just disabling the test where needed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-23 20:24:50 -04:00
Uli Schlachter 941c997314 tests: Add a very basic test for the menubar
This does not actually test anything. It just makes sure that the code
runs. A proper test still seems to need some time and some hacks, but
this basic test is enough to check that the menubar does not cause any
Lua errors.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-23 20:24:44 -04:00
Emmanuel Lepage Vallée ef1d7d8396 Merge pull request #1647 from Elv13/free_layout
Add a manual (free floating) layout
2017-06-12 19:49:30 -04:00
getzze 15d66167f7 tests: Test the calendar widget 2017-06-12 02:58:06 -04:00
Emmanuel Lepage Vallee f2b7765355 tests: Test the `manual` layout. 2017-06-11 01:14:10 -04:00
Emmanuel Lepage Vallee 9e01c92ea2 tests: Minor changes to the wibox template. 2017-06-11 01:14:10 -04:00
Uli Schlachter 3bb8efd2db Re-arrange the magnifier layout on focus changes
Just re-arranging on every focus change would cause useless/needless
re-arranges (which have no effect except to waste CPU time). Thus, this
adds a special (undocumented) flag on layouts that makes sure that a
rearrange occurs when the focus changes.

Fixes: https://github.com/awesomeWM/awesome/issues/1799
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-09 10:13:14 +02:00
Uli Schlachter 0abfed54de example tests: Switch to new API
This makes the templates used by the example tests use the new API added
in the previous commit.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-30 11:22:07 +02:00
Uli Schlachter e90f3ef253 test-maximize.lua: Test all gravities
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-26 18:24:28 +02:00
Uli Schlachter 3e0eefe3bc Add a test case for some recent bug
This test would have caught
https://github.com/awesomeWM/awesome/issues/1607.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-26 18:24:28 +02:00
Uli Schlachter 08555a4fed test-maximize: Restore old border width
When the border width changes, we move the client according to its
gravity. This can cause problems with the following code. Fix this by
restoring the original border width again, which undoes the move.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-26 18:24:28 +02:00
Emmanuel Lepage Vallee 5d944e3c1a tests: Add client self-resizing support to the tests 2017-05-23 22:34:12 +02:00
Emmanuel Lepage Vallee ae7b173c54 tests: Add resizing support to the test client 2017-05-23 22:33:26 +02:00
Emmanuel Lepage Vallee 710039ed3f tests: Test more maximization corner cases 2017-05-23 22:33:26 +02:00
Emmanuel Lepage Vallee 0eab45520e tests: Add maximization support to the test client
Both a "before manage" and "later" mode.
2017-05-23 22:33:26 +02:00
Emmanuel Lepage Vallée b6e6a04895 Merge pull request #1776 from psychon/emit_property_floating
Always emit property::floating when needed
2017-05-16 13:57:51 -04:00
Uli Schlachter 498510e810 Add a new disposition to _multi_screen.lua
Without the previous commit, this would make test-awful-client.lua fail.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-15 08:15:59 +02:00
Uli Schlachter 2eef92a891 test-maximize: Improve error messages
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-14 10:10:03 +02:00
Emmanuel Lepage Vallee e7232c0dc2 test: Use the test client in test-maximize 2017-05-14 09:56:58 +02:00
Emmanuel Lepage Vallee 2da1900d85 tests: Add gravity to the test client 2017-05-14 09:56:54 +02:00
Uli Schlachter 3ed0be6d85 Add a test for gravity handling (#1760)
This adds a C program which tests if the window manager handles
gravities correctly. This program is loosely based on metacity's
test-gravity.c, but completely rewritten and this version does automatic
tests instead of allowing the user to perform testing by hand.

By having this as a self-contained C program, it is possible to compare
awesome's behaviour with the behaviour of other WMs.

In my testing, only metacity and awesome pass this test. This is not
that much of a big surprise since awesome was fixed in
https://github.com/awesomeWM/awesome/pull/505 to work correctly with
metacity's test-gravity.c. However, I am surprised that e.g. Fluxbox
gets this wrong.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-13 23:28:45 +02:00
Uli Schlachter e1bad41fc8 Always emit property::floating when needed
There are some cases where a client's floating state "silently" changes.
For example, a fullscreen client will be considered floating. However,
even though c.floating changes its value in this case, we did not emit
the property::floating signal.

Fix this by explicitly tracking the "implicitly floating" state. When
some property that influences this "implicitly floating" state changes,
we update it and if a client which was not explicitly assigned a
floating state observes a change in this value, property::floating is
emitted.

This was tested by running a terminal and two xeyes in a tag with a
tiling layout where awful.ewmh was patched so that clients do not change
their geometry when fullscreening or maximizing. It was observable that
after this patch e.g. the titlebar and the tasklist update to show the
floating state of the client which became implicitly floating due to
being maximized.

Fixes: https://github.com/awesomeWM/awesome/issues/1662
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-11 16:22:16 +02:00
Uli Schlachter 07d0bcb713 Stabilize awful.tooltip code coverage (#1773)
For a while now we had our code coverage tools tell us that the coverage
for one line of code fluctuated. Sometimes it was being executed and
other times it was not. This is useless noise.

I think what is happening here is that the coverage depends on the order
of iteration over a table. Either the tooltip that is being created was
first made visible and then it text changed, or things happened in the
opposite order.

Fix this by doing this by explicitly changing the tooltip's text while
it is surely visible.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-07 18:00:22 +02:00
Uli Schlachter b3635a0101 Make the output of the gears.object.signal example stable (#1703)
Previously it would print a table which would include the memory
location where the table was stored. Thus, this produces a different
result on every build.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-04-08 10:00:34 +02:00
Kevin Zander 74fb39afbd Remove deprecated calls in tests
Change deprecated util.table call in lib/awful/widget/clienticon.lua to gears.table call
2017-03-30 23:07:20 -05:00
Kevin Zander 6cb2e0fa82 Fix some deprecated calls in code and docs
Add missing newline in test runner
2017-03-30 21:26:50 -05:00
Emmanuel Lepage Vallée b81b2149f6 Merge pull request #1679 from psychon/keyboard-layout-changes
Asynchronously update the keyboard state
2017-03-29 13:59:34 -04:00
Uli Schlachter 2f652a1de9 Speed up tests/run.sh on Travis (#1682)
tests/run.sh waits for awesome to exit via tail's "--pid" option. This
makes tail check once per second if the process still exists and if not,
tail will exit. However, the default of "once per second" causes lots of
wasted time for us.

This commit adds the argument "-s 0.1" to tail which makes tail check
once every 0.1 seconds. This commit changes the time that "tests/run.sh"
runs on Travis from about 60 seconds to about 35 seconds, which is a big
improvement.

Closes: https://github.com/awesomeWM/awesome/issues/1374
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-29 18:46:47 +02:00
Uli Schlachter 9f3a6757e9 Asynchronously update the keyboard state
When the keyboard layout is modified via xmodmap, each single "change"
(line of input to xmodmap) causes an "the keyboard configuration
changed"-event to be sent. Awesome reacted to each of these events by
reloading the keyboard layout. Thus, awesome reloaded the keyboard
layout a lot and appeared to freeze.

Fix this by asynchronously update the keyboard state: When such an event
comes in, instead of reloading things immediately, we set a flag which
makes us update the state at the end of the main loop iteration. This
means that many events still cause only a single (or at least few)
re-quering of the layout. Thus, a lot of time is saved.

This commit removes the argument to the (undocumented!) signal
xkb::group_changed. Previously, the argument was the active group
number. Since this argument was unused and I'm lazy, I just removed it.
The alternative would be that it might be visible to Lua that some "the
active group changed"-events are dropped.

Fixes: https://github.com/awesomeWM/awesome/issues/1494
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-28 15:21:01 +02:00
Kevin Zander 45dadde0dd Move filesystem functions out of awful.util into new gears.filesystem
Update awful.util filesystem function calls to gears.filesystem function calls
Rename getdir to get_dir for consistency
2017-03-15 13:46:33 -05:00
Kevin Zander c3461b535c gears: Move awful.util.table to gears.table (#1641)
* 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
2017-03-08 15:18:33 -05:00
Emmanuel Lepage Vallée 8f6e80f5c6 Merge pull request #1640 from psychon/add_to_wibox_lists
Add some non-helpful examples
2017-03-07 18:45:29 -05:00
Uli Schlachter 93b53bcf3f Add some non-helpful examples
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>
2017-03-07 11:32:17 +01:00
Uli Schlachter 6f803cf3b3 Fix code using awful.util.round
This gets rid of lots of deprecation warnings

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-06 17:11:05 +01:00
getzze bf2d658380 Add tests for grid layout
Update tests

Update tests

Separate spacing and padding tests

Update tests amd add imperative usage

Change fixed_size to homogeneous property

Update tests
2017-03-04 20:57:33 -05:00
Emmanuel Lepage Vallée 971adec0d0 Merge pull request #1622 from Veratil/fix-new-luacheck
Fix Luacheck 0.19.0 release Travis breaks
2017-03-04 13:32:53 -05:00
Daniel Hahler 0bd29ae1e9 Merge pull request #1580 from psychon/only_on_screen
Add a only_on_screen container widget
2017-03-04 04:06:21 +01:00
Kevin Zander 3f6df8ddee Fix Luacheck 0.19.0 release Travis breaks 2017-03-03 16:41:12 -06:00
Uli Schlachter 2b2612314c Add a only_on_screen container widget
Fixes: https://github.com/awesomeWM/awesome/issues/1565
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-03 13:25:28 +01:00
Kevin Zander 7f6763fb00 Add awesome.version to globals for tests. Will always show util.deprecate output 2017-03-02 18:15:59 -06:00
morethanoneanimal 1c71260389 Replace improperly used asserts with warnings.
Add awful.spawn noop function to hooks.lua test. Previously it was nil.
2017-02-21 00:31:33 +01:00
Emmanuel Lepage Vallee e221f8414c tests: Validate wibar geometry in the struts test
Prevent #1523 from regressing
2017-02-13 22:41:25 -05:00
Emmanuel Lepage Vallee 4a4864bb75 doc: Add another declarative syntax example
Better show the composite/encapsulated widgets
2017-02-12 22:19:08 +01:00