Commit Graph

7273 Commits

Author SHA1 Message Date
Daniel Hahler 7fce4ba7dd Merge pull request #748 from blueyed/minor
Minor doc/style fixes
2016-03-06 15:10:53 +01:00
Daniel Hahler 89b2ea6c08 Add exclamation mark with error in luaA_dofunction_on_error
This makes it more obvious/visible in the log / output.
2016-03-06 14:46:45 +01:00
Daniel Hahler 8966c73599 Minor doc fixes 2016-03-06 14:46:13 +01:00
Uli Schlachter 93e50b2e23 Merge branch 'lua-index-handlers' of https://github.com/psychon/awesome 2016-03-06 14:19:00 +01:00
Uli Schlachter 95e5bdf5d2 Use the new way to iterate over screens in Lua
This gets us one step closer to removing screen indices.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-06 14:05:28 +01:00
Uli Schlachter 0a39459605 Add a non-index way to iterate over screens
This is a preparation for getting rid of screen indices.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-06 14:05:28 +01:00
Daniel Hahler 693c225445 Merge pull request #745 from psychon/small-things
Small things
2016-03-06 14:04:47 +01:00
Uli Schlachter dd78f8e6f2 Remove another useless iteration over screens
Any signal on a screen instance is also emitted on the screen class, so the here
can just connect to the screen class.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-06 11:38:52 +01:00
Uli Schlachter 8b65bad3fc Remove useless iteration over screens
Signals on instances are also emitted on the class and thus we can just connect
to the signal on the class here.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-06 11:37:38 +01:00
Uli Schlachter 8fd801a6f4 awful.util.get_rectangle_in_direction(): Use pairs
This code works just fine with non-integer table keys. Also, this is used by
awful.screen.focus_bydirection() and thus will be used with screen objects
instead of screen indicies when we get rid of screen indicies.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-06 11:34:44 +01:00
Uli Schlachter 7f43608d73 dbus.c: Check string return values properly
Apparently some versions of dbus kill the process with a failed assertion if
invalid UTF8 should be send out. Mine doesn't. Also, our behaviour of replacing
non-strings silently with strings is weird.

This commit thus makes converting from Lua to dbus fail if a non-string should
be sent as a string or if a string contains malformed UTF8.

Fixes: https://github.com/awesomeWM/awesome/issues/728
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-06 11:16:49 +01:00
Uli Schlachter 77507a2877 dbus.c: DBUS_MSG_RETURN_HANDLE_TYPE_STRING is only used once
So undefine this

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-06 11:12:10 +01:00
Uli Schlachter 9a030ba299 dbus.c: Fix handling of DBUS_TYPE_BYTE
From the DBus docs of DBUS_TYPE_BYTE:

   Type code marking an 8-bit unsigned integer.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-06 11:07:37 +01:00
Uli Schlachter 2d8421730b Fix stack handling on errors for the mouse grabber
This one actually uses the return value from the function (where's the
consistency?!), so the code is fixed to only pop the return value if there is
actually one.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-06 10:52:58 +01:00
Uli Schlachter b59b28f716 Fix error handling in the keygrabber
We called the keygrabber and told Lua we are expecting one return value, so Lua
will always get us one return value on the Lua stack. However, when an error
happens, nothing is pushed on the stack, but we still tried to pop the return
value. This corrupted the Lua stack.

The easiest fix is to just not ask for a return value that is not used anyway.

Not adding a test for this, because the test has to cause a Lua error which the
C code will then log to stderr and the test runner considers this a test
failure...

Fixes: https://github.com/awesomeWM/awesome/issues/735
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-06 10:52:16 +01:00
Uli Schlachter e18bece3df Make tests more reliable on "early errors"
When e.g. test-leaks.lua fails, it will cause a Lua error before starting the
test runner. This means that the test will just hang, because nothing causes
awesome to quit.

Handle this by starting a timer when the test runner is loaded and quitting
awesome in there if no test run was started yet. This only works if all tests
load the runner before doing anything that could fail, so the require("_runner")
is moved to the beginning in every test.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-06 10:20:45 +01:00
Uli Schlachter 2e2e3f07e2 systray: Emit layout_changed / redraw_needed where needed
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-05 16:53:38 +01:00
Uli Schlachter a1b20ef6bb Systray: Add settings for which screen to display on
This makes it possible to have the systray only visible on the primary screen,
which is the new default value. This also makes it possible to configure
directly on which screen the systray should be visible.

This breaks the API in the sense that people who use "the old method" to
configure the systray's screen possibly don't have a systray.

Fixes: https://github.com/awesomeWM/awesome/issues/724
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-05 16:49:49 +01:00
Uli Schlachter 1e5dd0c782 systray: Add API documentation
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-05 16:39:25 +01:00
Uli Schlachter ea95963726 systray: Turn this into a singleton
There's no point in having multiple instances of this, because there are no
per-instance settings and the systray can only be visible in a single place at a
time anyway.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-05 16:17:35 +01:00
Uli Schlachter 7739a6a7ed Add a property::visible signal to tooltips
As requested here:
b4224a651f (commitcomment-16402861)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-05 12:32:24 +01:00
Uli Schlachter e347f7191c awful.tooltip: Use metatable magic to create wiboxes lazily
This might make the code a bit easier to follow. Unless you want to know where
the wibox is created...

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-03-05 12:31:03 +01:00
Daniel Hahler ab408103ee Merge pull request #734 from blueyed/readme-apidocs
doc: link to automatically built docs for master
2016-03-04 11:25:58 +01:00
Emmanuel Lepage Vallée 249a3f7ce0 Merge pull request #737 from Elv13/minor_widget_enhancements
wibox.widget: Minor enhancements
2016-03-04 04:24:34 -05:00
Emmanuel Lepage Vallee 78ed3abe1a wibox.widget: Minor enhancements
* Better widget names when using the declarative syntax
 * Add ratio.get_ratio to avoid using the private API
 * Also support `set_widget` when swapping widgets
2016-03-04 04:16:53 -05:00
Emmanuel Lepage Vallée 9ee69ad8ad Merge pull request #731 from Elv13/fix_awful_place
RFC awful.placement: Use math.ceil()
2016-03-04 04:13:43 -05:00
Emmanuel Lepage Vallée 2de2584094 Merge pull request #738 from awesomeWM/add_transparent
gears.color: Add transparent constant
2016-03-04 04:12:01 -05:00
Emmanuel Lepage Vallee 2aa15c9454 gears.color: Add transparent constant
Avoid repetitive "#00000000" for transparent wiboxes and such
elements.
2016-03-04 03:16:56 -05:00
Emmanuel Lepage Vallee 167f5e2821 drawin: Use numbers rather than integers
This solve issues when using wibox with `awful.placement`
2016-03-04 02:43:19 -05:00
Daniel Hahler 3730086bcc tests/run.sh: avoid warnings by setting up fg/bg/colors in xrdb 2016-03-04 01:41:43 +01:00
Daniel Hahler 7c7295a282 Merge pull request #716 from psychon/wallpaper_cleanup
Wallpaper cleanup
2016-03-03 22:16:48 +01:00
Daniel Hahler a1687dc72e Merge pull request #730 from actionless/fix-menubar-pagination-again
fix(lib: menubar): take in account common list padding
2016-03-03 22:15:11 +01:00
Daniel Hahler ef19a8213a awful.client.jumpto: un-minimize clients
Fixes https://github.com/awesomeWM/awesome/issues/472.
Closes https://github.com/awesomeWM/awesome/pull/729.
2016-03-03 22:09:10 +01:00
Daniel Hahler a256c9676b doc: link to automatically built docs for master
[ci skip]
2016-03-03 22:06:23 +01:00
Emmanuel Lepage Vallée 3be5343e83 Merge pull request #709 from psychon/implement-set-children-sanely
Implement set children sanely
2016-03-03 02:06:58 -05:00
actionless b93d6a4b25 fix(lib: menubar): take in account common list padding 2016-03-02 15:47:50 +01:00
Daniel Hahler 68bde9d584 Merge pull request #717 from blueyed/callback-for-client.jumpto
Add callback support for client.jumpto
2016-03-01 23:01:32 +01:00
Emmanuel Lepage Vallée 97b26ab3ef Merge pull request #727 from psychon/fix-wibox.layout.mirror
Fix the mirror layout
2016-03-01 00:30:10 -05:00
Uli Schlachter b40b69d379 Fix the mirror layout
Issues involve:
- :layout() had the wrong signature and expected a cr argument that was left
  from when this was still the :draw() function.
- horizontal and vertical reflection were mixed up (I guess it has always been
  this way?)
- The return value should be a table of widget placements. Instead it was just a
  single widget placement.

This is broken since commit 85ab3f045b.

Fixes: https://github.com/awesomeWM/awesome/issues/718
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-29 22:50:47 +01:00
Uli Schlachter a189f2b13f Merge branch 'Return-nil-in-xrdb_get_value' of https://github.com/psychon/awesome 2016-02-29 20:59:21 +01:00
Uli Schlachter b8b270a91e Make xrdb_get_value() behave as documented
The documentation states that this function returns nil if the property does not
exist, but it actually returned nothing. And yes, in Lua this is a difference...
2016-02-29 11:13:58 +01:00
Emmanuel Lepage Vallée 512e966be7 Merge pull request #721 from Elv13/fix_awful_screen
awful.screen: Fix regression
2016-02-29 04:29:22 -05:00
Emmanuel Lepage Vallee 924e889271 awful.screen: Fix regression 2016-02-29 04:21:10 -05:00
Emmanuel Lepage Vallée b010849c3c Merge pull request #722 from Elv13/expose_graph
awful.widget.graph: Expose private data
2016-02-29 04:16:17 -05:00
Emmanuel Lepage Vallée 78f93940c7 Merge pull request #720 from Elv13/allow_no_tag
awful.layout: Allow parameters to be called when no tags is selected
2016-02-29 04:10:14 -05:00
Emmanuel Lepage Vallee 19f874a73f awful.widget.graph: Expose private data 2016-02-29 03:12:08 -05:00
Emmanuel Lepage Vallee 07631ccc9a awful.layout: Allow parameters to be called when no tags is selected
There seem to be a little race condition (either in my layout code or
elsewhere) when playing with multiple screens. As most properties do
not depend on the tag, there is no point in returning early anyway.
2016-02-29 02:49:20 -05:00
Daniel Hahler 0278d5f123 Add callback support for client.jumpto
Instead of true/false `merge` can be a callback now, which allows for
more dynamic handling of the client not being visible, e.g. moving it to
the current tag, instead of merging.
2016-02-28 22:45:15 +01:00
Daniel Hahler 9503110e44 Merge pull request #714 from psychon/tooltip-windows
Less tooltip windows
2016-02-28 22:21:18 +01:00
Daniel Hahler 4ba8386f7b Merge pull request #715 from psychon/lazy_border_update
Lazily apply changes to border_width and border_color
2016-02-28 22:16:32 +01:00