Commit Graph

8172 Commits

Author SHA1 Message Date
Uli Schlachter 919865eb5b WIP: Crashes?!?
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-08 19:33:04 +01:00
Uli Schlachter a15ef443b0 tests/_client.lua: Use LGI's Async facilities
Normally, writing asynchronous code with Gio results in a mess of
spaghetti codes because of the many callbacks that are needed. To
improve upon this, LGI provides some coroutine-based magic to improve
readability.

This commit makes the code in _client.lua use this.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-08 19:33:04 +01:00
Uli Schlachter 28fec60bf9 awful.spawn: Use LGI's Async facilities
Normally, writing asynchronous code with Gio results in an awful mess of
spaghetti code, because every operation needs a callback that is called when
this operation is done. To improve upon this, LGI provides some magic with
coroutines that hide the asyncronous nature of things and you end up with
"normal looking" code.

Use this Gio.Async facility in awful.spawn to make the code easier to follow.

Signed-off-by: Uli Schlachter <uli.schlachter@informatik.uni-oldenburg.de>
2017-01-08 19:33:04 +01:00
Emmanuel Lepage Vallée aab37dc629 Merge pull request #1366 from thekrampus/volatile-theme-vars
Add taglist theme variables for volatile tags
2017-01-08 03:39:54 -05:00
rob cb3138544f themes: updated taglist variable hint comments 2017-01-07 21:22:30 -07:00
rob 703b11182c taglist: added volatile tag theme variables 2017-01-07 21:21:46 -07:00
Emmanuel Lepage Vallée 6896a0aab7 Merge pull request #1363 from Airblader/fix-include
Remove obsolete include and Xlib comment.
2017-01-06 03:19:23 -05:00
Ingo Bürk 11a29540f2 Remove obsolete include and Xlib comment. 2017-01-05 23:17:11 +01:00
Daniel Hahler 466988eb5a Merge pull request #1354 from psychon/menubar-fixes
Menubar fixes
2017-01-04 20:55:51 +01:00
Emmanuel Lepage Vallée 5e1b88cbb6 Merge pull request #1361 from Elv13/fix_mag
layout: Fix the magnifier layout
2017-01-04 06:47:10 -05:00
Emmanuel Lepage Vallee cefa14d1bd layout: Fix the magnifier layout
It was broken since the dynamic screen support was merged.

Fix #1338
2017-01-04 04:56:54 -05:00
Emmanuel Lepage Vallée a1085b64dd Merge pull request #1358 from Elv13/clear_the_cache
build: Clear the cache when checking if a package is present
2017-01-04 04:45:09 -05:00
Emmanuel Lepage Vallee 160ea0fd66 doc: Fix 2 missing parentheses 2017-01-04 00:12:44 -05:00
Emmanuel Lepage Vallee b26aff3cd0 build: Clear the cache when checking if a package is present
While on Gentoo I get the right error message anyway, apparently
this isn't universal.

Fix #1356
2017-01-03 15:56:58 -05:00
Emmanuel Lepage Vallée 7f9d62c49b Merge pull request #1347 from Elv13/revert_messing_indentation
Revert some of the indentation changes
2017-01-03 01:03:00 -05:00
Emmanuel Lepage Vallee 6158091422 doc: Partially revert the indentation changes
This messes up the doc
2017-01-03 00:12:28 -05:00
Emmanuel Lepage Vallee 767cda5830 doc: Fix some example tests indentation
When `DOC_NO_USAGE` is set, the examples need 4 spaces as per the
markdown spec.
2017-01-03 00:10:18 -05:00
Emmanuel Lepage Vallee 790d2aa6ee doc: Add a missing test example macro
I found this while doing a review in case the intentation changes
broke other tests.
2017-01-03 00:07:57 -05:00
Emmanuel Lepage Vallee ad203232c4 cmake: Add an extra space to the @usage code
Otherwise commented lines look like ---- My comment
instead of -- -- My comment. This wasn't a problem before the
intentation fix commit, but it is now.
2017-01-03 00:07:57 -05:00
Daniel Hahler 9d69825766 Merge pull request #1345 from psychon/test-runner-speed2
Test runner speedup
2017-01-03 02:13:44 +01:00
Daniel Hahler 4b9e8e232d Merge pull request #1341 from psychon/modeline
Lots of fun with vim modelines
2017-01-02 19:56:06 +01:00
Uli Schlachter 1078a9f395 Bump minimal LGI version to 0.8.0 (#1350)
Turns out that menubar already uses features that were only added in
that version.

Fixes: https://github.com/awesomeWM/awesome/issues/1348
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 19:53:02 +01:00
Uli Schlachter f7025e2f73 Fix tests/run.sh
Commit a944636c02 "bashified" tests/run.sh for some reason.
Afterwards, commit 4abd820051 fixed some of the fall-out.
However, there is still a problem left.

We have "set -e" in this script. Thus, whenever some command exits with
status 0, the script abort. When the variable errors is zero/unset, the
command "((errors++))" has exit status zero. Thus, this instruction
caused the shell script to abort. This was not intended.

Fix this by using "((++errors))" instead.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 19:35:13 +01:00
Uli Schlachter 6534208f62 tests/_runner.lua: Use less waiting
Before this, the test runner used a timer which fired every 0.1 seconds
to "do its thing". Many of these waits seem unnecessary.

This commit makes the test runner wait 0 seconds for the first call of a
step function. Only following calls will have a timeout of 0.1 seconds
applied.

A full run of the test suite (tests/run.sh without further arguments)
took about 100 seconds before this change. After this change, we are
down to 60 seconds. This is almost factor two faster! (Well, five thirds
is the exact number, so factor 1.66)

(The numbers are best out of three runs. The "before" number is rounded
down while the "after" number is rounded up.)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 19:34:41 +01:00
Uli Schlachter edff48f133 test-awful-client.lua: Fix indentation
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 19:34:41 +01:00
Uli Schlachter a1b5782e90 test-awful-client.lua: Wait for c:kill() to be done
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 19:34:41 +01:00
Uli Schlachter 30912c6f24 test-geometry: Wait for c:kill() to be done
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 19:34:41 +01:00
Uli Schlachter 0d8106c6dd test-leak-client.lua: Wait for c:kill() to be done
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 19:34:41 +01:00
Uli Schlachter 0dff0c308a test-geometry.lua: Fix indentation
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 19:34:41 +01:00
Uli Schlachter 5bbe6747fc tests: Add calls to awesome.sync() where needed
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 19:34:41 +01:00
Uli Schlachter 54dd973e3f Add awesome.sync()
This function should only be necessary for the test suite. It makes sure
that the X11 server received and handled all previous requests that
awesome sent. This will be needed, for example, in tests that use
root.fake_input().

After a call to awesome.sync(), we are sure that "faking input" has been
done and the next main loop iteration will handle the input event.
Without the sync, it could happen that the X11 server did not yet fake
the input in the next iteration.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 19:34:41 +01:00
Uli Schlachter dadf8463bd menubar: Fix refresh without show
When menubar.refresh() is called, it tries to update the menubar widget.
The call chain looks like this: menulist_update -> common.list_update ->
get_current_page. get_current_page then tries to query information about
the size of the menubar.

Since there is not much point in this, just skip the whole callback in
this case.

Side note: What is the point of menubar.get()? It seems quite useless to
me.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 17:23:20 +01:00
Uli Schlachter 7f3ff5f26f menubar: Fix hide()
When hide() was called without any calls to shown() before, an error
would occur.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 17:21:10 +01:00
Uli Schlachter 68f0883a44 menubar: Refactor initialisation
No functional changes intended. I just like things more like this.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 17:20:41 +01:00
Uli Schlachter 0f755c8f12 Fix error handling in _client.lua
Previously we got the following unhelpful error message:

tests/_client.lua:98: bad argument #2 to 'assert' (string expected, got
userdata)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 16:10:38 +01:00
Uli Schlachter 4c322a613f Ignore SIGPIPE
When the child process in tests/_client.lua breaks and exits (for
example: Remove the call to Gtk.main), we get a broken pipe. When trying
to write to the pipe that connects awesome to the child process, we get
a SIGPIPE signal that causes awesome to exit without any good error
message.

Fix this by ignoring SIGPIPE. We do not want to be killed by it anyway.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 16:06:04 +01:00
Uli Schlachter 6c3ac979a4 Merge branch 'struts' of https://github.com/psychon/awesome 2017-01-01 11:39:25 +01:00
Uli Schlachter 20b46cc2b3 tag_client: Update screen workarea
This fixes the last failure in test-struts.lua.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-31 15:35:33 +01:00
Uli Schlachter ea2d2cd038 untag_client: Update screen workarea
This partially fixes test-struts.lua. The test now fails at some later
part.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-31 15:34:09 +01:00
Uli Schlachter e5be281ff3 client_set_sticky: Update screen workarea
This partially fixes test-struts.lua. The test now fails at some later
part.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-31 15:31:41 +01:00
Uli Schlachter feb4fb0fbc tag_view: Update screen workarea
This partially fixes test-struts.lua. The test now fails at some later
part.

Fixes: https://github.com/awesomeWM/awesome/issues/1335
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-31 15:30:14 +01:00
Uli Schlachter c65cf9d3d3 test-struts.lua: Add tests for client struts
These new tests currently fail.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-31 15:27:28 +01:00
Uli Schlachter 9089874193 Fix indentation in test-struts.lua
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-31 14:51:29 +01:00
Uli Schlachter 2b79165622 Add missing vim modelines in lib/
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-31 14:07:13 +01:00
Uli Schlachter d893e42440 Add missing modelines to tests/*.lua
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-31 14:05:51 +01:00
Uli Schlachter cc0e8662a8 Reindent Packaging.cmake
It was using tabs instead of spaces.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-31 14:03:18 +01:00
Uli Schlachter 7d3b7fc48a Add vim modelines to all CMake files
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-31 14:02:14 +01:00
Uli Schlachter 46c32d9df1 tests/example: Add vim modelines
This uses DOC_HIDE magic in the actual test code, except for the
template.lua files which do not have it.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-31 13:59:38 +01:00
Uli Schlachter af59d52ddf Slightly change DOC_HIDE magic
The following commits will add DOC_HIDE uses that are not at the end of
the line, but the beginning. Hence, drop the requirement that it appears
at the end of the line and change the ".+" at the beginning into ".*".

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-31 13:58:35 +01:00
Daniel Hahler af961e974c doc: improve client.dockable (#1336) 2016-12-31 00:40:17 +01:00