Commit Graph

8037 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee 8c2d85523f screen: Do not use the deprecated geometry access 2016-09-11 02:09:44 -04:00
Emmanuel Lepage Vallee f1e61092cd ewmh: Do not use the deprecated geometry access 2016-09-11 02:09:36 -04:00
Emmanuel Lepage Vallee 4d0c426040 menubar: Do not use the deprecated geometry access 2016-09-11 01:55:33 -04:00
Emmanuel Lepage Vallée e86ddaab56 Merge pull request #1083 from Elv13/menubar-priority-category-fix
Menubar priority category fix
2016-09-11 00:47:45 -04:00
modk 12ea5e2318 menubar: Refactoring and cleanup 2016-09-11 00:32:57 -04:00
modk 1a40333b9e menubar: Fix entry use count for categories
Fix #999
2016-09-11 00:32:47 -04:00
Emmanuel Lepage Vallee 9b96b4b448 resize: Use the right mouse cursor
Fix #1018
2016-09-10 23:56:10 -04:00
Emmanuel Lepage Vallee e66120913f screen: Fix a memory leak.
Found while investigating #1079
2016-09-10 23:54:45 -04:00
Rob Hoelz df5caa06eb Return success/failure for dbus.connect_signal
dbus.connect_signal may only have a single function bound to
a given name, but the caller has no way of knowing if their
function was bound or not.

This change has dbus.connect_signal adopt the standard Lua error
convention of returning a truthy value upon success, or nil and an error
message upon failure.
2016-09-09 07:43:56 -05:00
Emmanuel Lepage Vallée 587cc530c7 Merge pull request #1067 from BlueUsername/tiling-to-floating-window-fix
Fix a bug moving between a tiled and a floating screen.
2016-09-07 16:20:20 -04:00
Emmanuel Lepage Vallée 7a4bdca9c2 Merge pull request #1056 from Elv13/better_tag_index
Test multiple screens on the CI + fixes
2016-09-07 01:23:58 -04:00
Emmanuel Lepage Vallee 12b72d6164 drawable: Prevent collected drawables from being redrawn. 2016-09-07 00:41:10 -04:00
Emmanuel Lepage Vallee 35c0476c86 tests: Increase time limit to 120 seconds
The "test launching client on a specific screen" suit is very slow.

However, it is also necessary to avoid issues such as #1069 or #154
from regressing again.

This is a temporary fix until a faster test client "daemon" is
developped.
2016-09-07 00:40:30 -04:00
Emmanuel Lepage Vallee edf7fb40b3 tests: Test moving tags between screens. 2016-09-05 17:13:53 -04:00
Emmanuel Lepage Vallee 760e72f94a tests: Test spawning client on a specific screen. 2016-09-05 17:13:53 -04:00
Emmanuel Lepage Vallee db73887b9f tests: Add a framework to make it easier to test multiple screens.
While testing using "the real deal" and with all the tests would be
better, it would add a lot of complexity to the testing framework.

This module generate multiple multi-screen scenarios and some obvious
issues that they can cause. Over time, as more steps are added, it
will provide "good enough" testing for multiple screens.

Individual test suits can require() this utility to replicate their
steps for each multi-screen scenarios.
2016-09-05 17:13:53 -04:00
Emmanuel Lepage Vallee a0b40bfd8f tests: Try to detect client "manage" signal race conditions.
See #1028
2016-09-04 02:52:16 -04:00
Emmanuel Lepage Vallee e29a2d3ac9 client: Add property::tags
It is useful for rules debugging.
2016-09-04 02:52:16 -04:00
Emmanuel Lepage Vallee 21787444e4 client: Simplify screen selection decision tree.
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
2016-09-04 02:52:16 -04:00
Emmanuel Lepage Vallee abb36c3697 tag: Restore the history on the right screen when deleting. 2016-09-04 02:52:16 -04:00
Emmanuel Lepage Vallee 180e70f6d6 tag: Fix off by one when deleting.
If a tag has been deleted, then the number of tags is decremented,
the code still used the old count.
2016-09-04 02:52:16 -04:00
Emmanuel Lepage Vallee 2af0553b67 tag: Fix :delete() when there is no clients
The logic was broken. It prevented tags from being deleted.

This also make sure the boolean return value is always set.
2016-09-04 02:52:16 -04:00
Emmanuel Lepage Vallee d2988d1aab tag: Fix index when screen count change.
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.
2016-09-04 02:52:15 -04:00
blueusername 9ca57a8364 Fix a bug moving between a tiled and a floating screen.
Check if any of the window is on the screen it is moved to, not just
the topmost leftmost edge.

Signed-off-by: blueusername <blueusername@github>
2016-09-02 20:15:00 +01:00
Akulen 1be737be3a awful.widget.tasklist: Add an align option (#1065) 2016-09-02 18:14:43 +02:00
Daniel Hahler 2e97b68dac Merge pull request #1062 from psychon/use-awesome-client-arguments
Make use of awesome-client commands
2016-09-02 18:13:32 +02:00
Daniel Hahler c2755cbde9 Merge pull request #1063 from psychon/getopt_errors
Getopt errors
2016-09-02 18:12:49 +02:00
Uli Schlachter cf89f108ac Make use of awesome-client commands
This uses the new support introduced in f0f31bc305 in the docs and in
tests/run.sh, removing an useless use of cat/echo.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-08-31 17:45:37 +02:00
Uli Schlachter 4ce16084ff awesome-client: Handle errors when running arguments
Commit 78abb4a54c made awesome-client fail with a
non-zero exit code when sending a command that it got from stdin failed.

Commit f0f31bc305 added the possibility to specify
commands to run as arguments to awesome-client. However, the exit code was still
zero even when such a command failed.

This commit makes awesome-client signal errors with its exit code even for code
specified via arguments.

Note that this means that following arguments will not be executed if some
argument fails. I do not know if this is the best behaviour or not, but I am
implementing it like this here due to its simplicity to implement.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-08-31 17:44:43 +02:00
Uli Schlachter e1d5c0c925 Do not allow multiple --config arguments
Otherwise there is a small, unimportant memory leak. More important is the fact
that later such flags overwrite earlier flags.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-08-31 13:31:16 +02:00
Uli Schlachter 4cbf87b441 Remove empty-argument checks
This code removes code which could only be hit be running awesome --search '' or
awesome -c ''. In both cases there are many possibilities for weird/invalid
arguments and I don't see why the empty string deserves special treatment.

Note that awesome --search does NOT hit this code, because getopt_long handles
the case of "completely missing" arguments itself.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-08-31 13:27:07 +02:00
Uli Schlachter fd90061c24 Make argument parsing errors fatal
When you run "awesome --foobar", a warning will be printed (by getopt_long())
and awesome just ignores the invalid argument. That's unusual and weird.

This commit produces an error instead.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-08-31 13:26:28 +02:00
Emmanuel Lepage Vallée 08e4c304cd client: Fix a potential crash due to a race condition. (#1055)
If raise was called from the awful.rule `manage` callback at
startup with a client already present it crashed due to a
buffer underflow.
2016-08-30 12:59:45 +02:00
Fernando Vezzosi f0f31bc305 awesome-client: send command line arguments to awesome (#1058)
In some languages, invoking commands with command-line arguments is
significantly simpler than setting up pipes for writing to a command's
standard input.

This adds an additional way for sending commands through awesome-client;
so all of these will be equivalent:

  $ awesome-client 'awesome.restart()'
  $ echo 'awesome.restart()' | awesome-client
  $ awesome-client <<<'awesome.restart()'
  $ awesome-client
  awesome# awesome.restart()
  awesome# ^D
  $

Note that this sends each command line argument as a separate message
over dbus.
2016-08-30 12:58:54 +02:00
Emmanuel Lepage Vallée 83e0423e89 tooltip: Stop using a fallback font (#1061)
Let the default font be used, just as everywhere else.
2016-08-30 12:57:40 +02:00
Emmanuel Lepage Vallée 68aae5ff62 Merge pull request #1051 from Elv13/fix_tag_index
tag: Fix index calculation.
2016-08-22 18:09:03 -04:00
Emmanuel Lepage Vallee 01db39f5bb screen: Use math.huge instead of 9999 2016-08-22 17:27:48 -04:00
Emmanuel Lepage Vallee f2bb0ab871 tests: Test the tag index more often 2016-08-22 17:27:48 -04:00
Daniel Hahler 99657f49cf Travis: pin ldoc at 1.4.4
Ref: https://github.com/awesomeWM/awesome/pull/1051#issuecomment-241327733
2016-08-22 17:27:48 -04:00
Emmanuel Lepage Vallee bbfa6006f3 tag: Fix index calculation.
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
2016-08-22 17:27:48 -04:00
Emmanuel Lepage Vallee 99489584cc doc: Fix a typo (Disonnect -> Disconnect) 2016-08-21 04:28:59 -04:00
Emmanuel Lepage Vallée ba2750cf91 Merge pull request #929 from Elv13/geometry_overhaul_p3.03
Geometry overhaul part 3.03 (final part for 3.6)
2016-08-20 16:40:36 -04:00
Emmanuel Lepage Vallee 4aada37682 tests: Test tooltips 2016-08-20 16:21:48 -04:00
Emmanuel Lepage Vallee 2088ca26e8 tooltip: Support generic properties in constructor 2016-08-20 16:21:48 -04:00
Emmanuel Lepage Vallee bc3cbc44c9 tooltip: Add position mode 2016-08-20 16:21:48 -04:00
Emmanuel Lepage Vallee 141b191921 tooltip: Add shape support 2016-08-20 16:21:48 -04:00
Emmanuel Lepage Vallee 8468d06350 placement: Port next_to_mouse to the new API 2016-08-20 16:21:48 -04:00
Emmanuel Lepage Vallee ea52b199c6 tooltip: Add align support 2016-08-20 16:21:48 -04:00
Emmanuel Lepage Vallee ade3fabaa9 tooltip: Make the 'visible' property dynamic 2016-08-20 16:21:48 -04:00
Emmanuel Lepage Vallee 2910a007df tooltip: Turn into a class
As done with everything else
2016-08-20 16:21:48 -04:00