Commit Graph

2412 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee facf676b13 screen: Fix potential nil index
This looks like a copy-paste error.
2016-08-01 15:29:02 -04:00
Emmanuel Lepage Vallee 41feec02a5 widget.base: Fix the root get_children_by_id() widget.
If the wibox root widget had an id, it was added to the properties,
but not the get_children_by_id() table
2016-08-01 15:26:29 -04:00
Emmanuel Lepage Vallee f20053bb33 awful.mouse: Fix 4 invalid function names 2016-07-30 15:49:46 -04:00
Emmanuel Lepage Vallée e472339011 Merge pull request #1013 from psychon/screen_area_signals
Screen area signals
2016-07-27 21:34:53 -04:00
Emmanuel Lepage Vallée 739ab8adc2 Merge pull request #1017 from juw/master
Change move and resize cursors
2016-07-27 21:33:35 -04:00
cmertz 4389297b58 restore client.border_width after fullscreen 2016-07-27 09:54:42 +02:00
Julian Wollrath ed34df119a Change move and resize cursors 2016-07-26 15:13:42 +02:00
Emmanuel Lepage Vallée 78171ea038 Merge pull request #1010 from Elv13/fix_declarative_widgets
widgets: Apply attributes before adding the widgets
2016-07-24 14:58:07 -04:00
Uli Schlachter 6e8b4f99f8 awful.layout: Move clients if a screen is moved
Fixes: https://github.com/awesomeWM/awesome/issues/976
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-07-24 16:36:03 +02:00
Emmanuel Lepage Vallee 79394c0965 widgets: Apply attributes before adding the widgets
For example, some layouts may place the widgets in a different order
depending on some attreibutes.
2016-07-23 17:24:13 -04:00
Emmanuel Lepage Vallee c159ad3ab2 drawable: Add more data to the find_widgets metadata table 2016-07-23 16:46:11 -04:00
Emmanuel Lepage Vallee 2e827202ec doc: Fix a matrix copy paste mistake 2016-07-22 21:55:23 -04:00
Uli Schlachter e6ddffda38 Fix awful.util.pread() return value (#1005)
The deprecation wrapper that we still have for this function didn't return
anything. However, awful.util.pread() used to return strings. This breaks
script.

Work around this by returning an empty string. That way code will still break,
but at least it should not error out.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-07-17 15:29:15 +02:00
Emmanuel Lepage Vallée 34cc04ec97 Merge pull request #972 from Elv13/prompt_fix
prompt: Fix hooks when number or caps lock are set
2016-07-16 22:59:54 -04:00
Emmanuel Lepage Vallee a87d75246f prompt: Fix hooks when number or caps lock are set 2016-07-16 22:39:06 -04:00
Uli Schlachter 2cfa117a14 Remove awful.{spawn.,}pread (#184)
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-07-16 17:59:47 +02:00
Emmanuel Lepage Vallee 31e2a19f65 key: Make the ignore_modifiers table public
The prompt need to re-use it and Mod2 could be useful to toggle
between 2 different Awesome modes.
2016-07-09 20:01:17 +02:00
modk 45d555d473 Priority heap to sort menubar entries by execution count (#879) 2016-07-09 19:23:36 +02:00
Daniel Hahler 25b6d31e97 Merge pull request #994 from psychon/fix-drawable-bgimage
Fix drawable bgimage
2016-07-09 19:17:48 +02:00
Uli Schlachter 2e13c120e8 Make rules with 'tag = "3"' work with multiple screens (#992)
The default config creates the same set of tags for all screens ("1" to "9"). An
awful.rules-rule with e.g. screen = 2, tag = "3" should obviously tag matching
clients with tag "3" of the second screen.

However, the implementation used the first matching tag in the list of all tags
and thus the client ended up tagged with tag "3" from screen 1. Fix this by
calling find_by_name() with the screen that the client is assigned to.

The existing implementation of awful.rules guarantees that any
"screen"-properties are applied before the code touched by this commit is run,
thus this should always work.

This commit does not add a test catching this because we are currently quite bad
at testing multi-screen scenarios and I don't want to invent the necessary
machinery right now.

Fixes: https://github.com/awesomeWM/awesome/issues/988
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-07-09 19:17:35 +02:00
Uli Schlachter 1a5680e57a Fix the titlebar minimize button (#995)
Commit 0318c6132840413b1f added an image for the minimize button which was
missing before. However, only the default theme and xresources where fixed to
contain the path to the image.

This commit adds the path to all themes.

Also, minimized clients aren't visible, just as closed (=killed) clients aren't
visible. Thus, we don't need an "active" version of this image.

This commit makes us handle the image for the minimize button just like we
handle the close button: There is no difference between "active" and "inactive"
and the file path in the theme doesn't get any path suffix.

Fixes: https://github.com/awesomeWM/awesome/issues/387
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-07-09 19:06:13 +02:00
Uli Schlachter 7f74c7c859 drawable: Draw bgimage with operator OVER
The actual bg is drawn either with fake transparency over the wallpaper (this
uses operator OVER) or for true transparency with operator SOURCE. The bgimage
should be drawn ontop of this without erasing the background and thus needs
operator OVER.

However, before this commit the bgimage was drawn in the same way as the bg and
thus inherited its SOURCE operator if a compositor is running. Fix this by
restoring the default operator (OVER) and also e.g. the default source before
drawing the bgimage.

Fixes: https://github.com/awesomeWM/awesome/issues/954
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-07-09 10:30:36 +02:00
Uli Schlachter d4454aba15 Fix drawable:set_bgimage()
When called with the file name of an image, this function failed to turn that
file name into a cairo surface.

Fixes: https://github.com/awesomeWM/awesome/issues/954
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-07-09 10:29:05 +02:00
Emmanuel Lepage Vallee 441587a4de shape: Use an explicit move_to to set rounded_rect position
All other shape did it. While it usually have no side effects,
as seen in #920 screenshot from @actionless, there is instances
where this produce a invalid rectangle.
2016-07-04 14:34:41 -04:00
Emmanuel Lepage Vallee 722879bcf7 mouse.resize: Handle when there is no selected tag
This should be very rare, but _is_ possible.
2016-06-27 02:44:07 -04:00
Emmanuel Lepage Vallee 4e6283e5ad layout: Avoid uneeded redraw
Reflowing the screen layout when floating clients changes is not
necessary.

This lower the CPU usage when dragging floating clients.
2016-06-27 02:44:07 -04:00
Emmanuel Lepage Vallee 6eca36d764 progressbar: Add missing includes documentation variables 2016-06-24 15:59:02 -04:00
Salorium b0d42e258a Correct name variable: this typo introduced into in 03e2310c54 2016-06-18 17:42:27 +02:00
Emmanuel Lepage Vallée f5cfc03e49 tag: Fix restoring invalid tags from history (#963)
If:

 1) An app is open in a tag
 2) A new tag is created
 3) The app is closed in the first tag
 4) The first tag is deleted
 5) The new tag is deleted

Then this history would try to restore an inactive tag without
a screen. Bad things will then happen.
2016-06-12 13:09:09 +02:00
Emmanuel Lepage Vallée d4dc579105 resize: restore the fleur cursor and add a beautiful option (#957)
Fixes #956
2016-06-10 23:53:55 +02:00
Uli Schlachter 2d511e2ab5 gears.object.properties: Implement read-only properties
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-08 20:28:31 +02:00
Uli Schlachter cdf16d4660 awful.mouse: Implement read-only properties
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-08 20:28:30 +02:00
Uli Schlachter 6956b9f6fa gears.object: Implement read-only properties
If a getter exists, but there is no setter, then this means that the property is
read-only.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-08 20:28:30 +02:00
Daniel Hahler d9cd0a4f0e Merge pull request #948 from psychon/deprecate-add-signal
Deprecate add_signal
2016-06-07 22:58:14 +02:00
Daniel Hahler efb8e65b15 Merge pull request #886 from psychon/fake-screen-resize
Fake screen resize
2016-06-07 21:13:35 +02:00
Emmanuel Lepage Vallee a057718d4d mouse: Fix moving clients between screens
Reported on IRC. I am not sure why swap() is not enough, but the
old code removed before the mouse refactor did this, so apparently
it is necessary.

The fix has been reported to work by spyroboy on IRC, thanks!
2016-06-06 00:23:48 -04:00
Uli Schlachter b84b03f15d Fix client snapping (#951)
First some reminder on how client geometries works (in X11, awesome just copied
that!):

- The position (x,y) defines where the border of the client begins
- This means that the content starts at (x+border_width,y+border_width)
- However, the size is the size of the client without border
- Thus, the client covers the rectangle from (x,y) to (x+2*bw,y+2*bw)

The client snapping code got this wrong. It only deals with rectangles and thus
for things to work as expected, the width/height have to be increased by two
times the border width. When snapping a client against other visible clients,
the geometry of the client to snap against wasn't calculated correctly.

This was apparently noticed at one point and worked around by decreasing the
position by two times the border width. While this is terribly wrong, it
actually makes things work correctly when snapping to the right or bottom edge
of a client, but breaks for the other edges.

Fix this by just calculating things correctly.

This is based on a patch from jk411.

Fixes: https://github.com/awesomeWM/awesome/issues/928
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-05 22:00:11 +02:00
Max 8ff60f034f Try menu_* colors before regular normal/focus (#949) 2016-06-05 17:08:43 +02:00
Uli Schlachter 0857f6f1b5 Lua: Remove calls to add_signal()
The requirement to call add_signal() was added to catch typos. However, this
requirement became increasingly annoying with property::<name> signals and e.g.
gears.object allowing arbitrary properties to be changed.

All of this ended up in a single commit because tests/examples fails if I first
let add_signal() emit a deprecation warning.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-04 18:23:48 +02:00
Uli Schlachter a7f7cab564 wibox: Remember the screen that was assigned
If screens overlap, the wibox should still remember which of the possible
screens it is assigned to.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-04 17:39:51 +02:00
Daniel Hahler 51ce375f01 tooltip: improve doc, call self.timer_function with self (#381) 2016-06-03 00:40:02 +02:00
Emmanuel Lepage Vallee 36bb9b4476 menu: Fix regression
There was already a bug, as self.active_child.visible
was used instead of self.active_child.wibox.visible

This caused some confusion that this attribute was a widget.
It wasn't.
2016-05-31 14:32:07 -04:00
Emmanuel Lepage Vallee 756862dff6 systray: Use table.crush 2016-05-30 23:12:49 -04:00
Emmanuel Lepage Vallee cbe046b0db progressbar: Add theme options 2016-05-30 23:10:03 -04:00
Emmanuel Lepage Vallee 7c00b2a55a graph: Add theme options 2016-05-30 23:10:02 -04:00
Emmanuel Lepage Vallee f9ff2f4909 stack: Enable the property system
And add the missing documentation
2016-05-30 23:10:02 -04:00
Emmanuel Lepage Vallee 23729b6296 flex: Enable the property system
And add the missing documentation
2016-05-30 23:10:02 -04:00
Emmanuel Lepage Vallee eddbbf7aca ratio: Enable the property system
And add the missing documentation
2016-05-30 23:10:02 -04:00
Emmanuel Lepage Vallee 0a8bc8156d align: Enable the property system
And add the missing documentation
2016-05-30 23:10:02 -04:00
Emmanuel Lepage Vallee b89fbcf940 fixed: Enable the property system
And add the missing documentation
2016-05-30 23:10:02 -04:00
Emmanuel Lepage Vallee 18500838d9 textclock: Add missing documentation 2016-05-30 23:10:02 -04:00
Emmanuel Lepage Vallee c62ca6c665 imagebox: Enable the property system
And add the missing documentation
2016-05-30 23:10:02 -04:00
Emmanuel Lepage Vallee 584a48db2f titlebar: Use _private 2016-05-30 23:09:50 -04:00
Emmanuel Lepage Vallee 5a0f7b7efe textbox: Enable the property system
And add the missing documentation
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee ea16481228 graph: Enable the property system
And add the missing documentation
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee 03e2310c54 scroll: Enable the property system
And add the missing documentation
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee 4ffbff3a5f rotate: Enable the property system
And add the missing documentation
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee bf74ca8a8c mirror: Enable the property system
And add the missing documentation
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee 8869257940 margin: Enable the property system
And add the missing documentation
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee 832e9ed054 constraint: Enable the property system
And add the missing documentation
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee a5edff396c background: Add the common object documentation 2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee 9630f3c3ed widget: Move the identifier index into _private 2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee fdf86ba84d widget: Move height and width into _private 2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee c0eabf9d8f widget: Move 'visible' into _private 2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee afa17fd8f9 widget: Move 'widget_buttons' into _private 2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee c828e56b57 widget: Fix documentation 2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee 542070205f widget: Add proper accessors for the 'opacity' property
To avoid collision with the property system and comply with the
API guidelines.
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee eb79b3262d background: Enable the property system 2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee c9dd32424f doc: Fix wibox.widget.base documentation
It was set as `module` instead of `class` because ldoc was confused
set shown the methods as functions and functions as methods.

This commit set the explicit section so ldoc don't gress (wrongly)
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee f9e82c1f57 background: Move all private attributes into _private
So there is no collision when properties are enabled
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee adb2f88383 objects: Add a table for private elements
Provide a standardized place for them rather than having each
widgets use their own conventions.
2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee efcbda0a78 widget.base: Add property support 2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee a8505ed019 doc: Add an imagebox widget default screenshot 2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee 83a9a9e67a doc: Add a progressbar widget default screenshot 2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee f29eeed82e doc: Add a graph widget default screenshot 2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee ec2cfc7be2 doc: Add a textbox widget default screenshot 2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee ab40a342af doc: Add a stack layout default screenshot 2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee 163748c782 doc: Add a ratio layout default screenshot 2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee 7fa56cb94c doc: Add a flex layout default screenshot 2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee 150026690c doc: Add a fixed layout default screenshot 2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee 5ba7af2be2 doc: Add an align layout default screenshot 2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee 490306a5fc shape: Add default rounded_rect radius
Add an arbitrary value to avoid all caller setting extra arguments.
2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee 47a471072a doc: Add a `margin` default screenshot 2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee 26cf28b23b doc: Add a `constraint` default screenshot 2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee de7ae79c6c doc: Add a `background` default screenshot 2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee 46c83b4001 doc: Add a `mirror` default screenshot 2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee ab0a9a077e doc: Add a `rotate` default screenshot 2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee bc2c0cfcb0 doc: Add a wibox.container.rotate example
Also fix the documentation
2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee 3c2aa09b86 doc: Document the beautiful vars used by the systray and textbox 2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee 9d0693ce3a doc: Do not export draw, fit and layout methods
They are used internally, users should never call them.

This will make the API documentation cleaner.
2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee be23bf0f15 widget: Fix documentation 2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee fd3e27c38b containers: Fix documentation
local functions and metatable based constructors are not
documented unless an explicit @function is added.

Also add missing return values and fix formatting.
2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee f9c9e11d11 graph: Move to wibox.widget 2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee 6493cbee76 progressbar: Move to `wibox.widget` 2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee ae0d306114 textclock: Move to wibox.widget
It doesn't depend on `awful`, so it doesn't belong in `awful`.
2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee 44a4eca40e doc: Port the shape images to the doc example system 2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee feb3833fd1 doc: Move the background examples to the container suit 2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee d85588babe wibox: Create a container module
Previously, the "containers" were placed in layout or widget.

They all have similar APIs and usage, so lets bring them together.
2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee 990beef9d0 util: Add a class deprecation function. 2016-05-30 17:51:18 -04:00
Emmanuel Lepage Vallee 3f0d218f72 util.table.crush: Optionally use rawset 2016-05-30 17:51:18 -04:00
Emmanuel Lepage Vallee dbcb850de9 wibar: Restore previous behavior
The behavior was changed during the rewrite. This was a mistake
as it was assumed (wrongly) that nobody used this function with
wiboxes other than "wibars" (awful.wibox).

Fixes #917
2016-05-19 13:27:46 -04:00
Emmanuel Lepage Vallee cc5e78ff55 wibar: Improve constructor documentation 2016-05-19 01:27:05 -04:00
Emmanuel Lepage Vallee 4d45063adb wibox: Add constructor documentation
The leading point is on purpose. It work around a ldoc bug and is
already used elsewhere (like signals without a ::)
2016-05-19 01:27:05 -04:00
Emmanuel Lepage Vallee f26fa5e099 wibox: Add more constructor arguments
Fixes #916
2016-05-19 01:27:05 -04:00
actionless 938de72ba7 fix(awful: wibar): visible arg was ignored 2016-05-19 00:21:22 +02:00
Emmanuel Lepage Vallée 3fd292e1ff Merge pull request #912 from Elv13/fix_tag_delete_race
tag: Avoid a race condition when deleting tags.
2016-05-18 16:01:30 -04:00
Emmanuel Lepage Vallee 6e6c4c3a5d tag: Avoid a race condition when deleting tags.
Since the screen removal patchset, the tags properties were
cleaned too early. This caused code connecting to "property::activated"
to be called with the tag already partially deleted. For code depending
on those properties, such as radical.impl.taglist, this caused errors.
2016-05-18 15:46:09 -04:00
Emmanuel Lepage Vallée c1d3f291fe Merge pull request #913 from Elv13/gear_obj_props
Gear.object properties
2016-05-18 15:20:43 -04:00
Emmanuel Lepage Vallee bb5ee50de9 layoutbox: Revert 25f4f24791
Apparently, there is such thing as not leaking enough...

Also try to clear the widgets from mywibox. This seem to help.

Time will tell.

Fixes #914, unfixes #808
2016-05-18 01:45:21 -04:00
Emmanuel Lepage Vallee d6a7b6c645 object: Add a dynamic property example 2016-05-18 01:23:53 -04:00
Emmanuel Lepage Vallee f810d78e7b object: Add a signal example 2016-05-18 01:23:53 -04:00
Emmanuel Lepage Vallee adebef629b object: Add an header description 2016-05-18 01:23:53 -04:00
Emmanuel Lepage Vallee b1c33fbd09 object: Add type information to documentation 2016-05-18 01:23:53 -04:00
Emmanuel Lepage Vallee 4b21ca9184 object: Add dynamic properties support.
Similar systems already exist un luaobject, wibox and the declarative
widget system. This close the gap and also bring the property based
syntax to wibox and other gears.object users.

While this need to be enabled explicitly for legacy reasons, it
doesn't break the API.

Once widespread, this implementation will replace the one found
in wibox.widget.base_widget.
2016-05-18 01:23:53 -04:00
Emmanuel Lepage Vallée 32eeaa9513 Merge pull request #878 from Elv13/geometry_overhaul_p3.02
Geometry overhaul part 3.02: Wibars
2016-05-16 14:13:38 -04:00
Emmanuel Lepage Vallee 11e77d5191 gears: Remove `screen`
It has been deprecated for a while and was never part of a release.
2016-05-16 14:03:00 -04:00
Emmanuel Lepage Vallee aa46b96369 gears.geometry: Add area_remove 2016-05-16 14:03:00 -04:00
Emmanuel Lepage Vallee 1ce92bb550 get_rect_by_dir: Move to `gears.geometry`
Begin to break down `awful.util`
2016-05-16 14:03:00 -04:00
Emmanuel Lepage Vallee 1a05d53cab screen: Use `gears.geometry` 2016-05-16 14:03:00 -04:00
Emmanuel Lepage Vallee dd121623b5 gears.geometry: Mutualize getbycoord 2016-05-16 14:03:00 -04:00
Emmanuel Lepage Vallee 251614afff wibox: Remove the dependency on `awful` 2016-05-16 01:18:28 -04:00
Emmanuel Lepage Vallee 9d13e08c63 gears: Add a geometry modules
Add an abstract geometry module to `gears`
2016-05-16 01:18:19 -04:00
Daniel Hahler eea8de5057 Merge pull request #899 from Jajauma/naughty-action-text
naughty: display improvement of the notification client actions
2016-05-16 03:08:22 +02:00
Emmanuel Lepage Vallee 4b395bea81 mouse: Port wibox.move to the placement API 2016-05-15 17:17:12 -04:00
Emmanuel Lepage Vallee 38185b161a wibar: Add a remove function 2016-05-15 17:17:12 -04:00
Emmanuel Lepage Vallee dafd29f2a3 awful.wibox: Rename to awful.wibar
Why:

 * Two different (but related) concepts had the same name
 * Users were confused for years on IRC
 * The wibar name was already in use in some doc to avoid confusion
2016-05-15 17:17:12 -04:00
Emmanuel Lepage Vallee 7d390a91f1 awful.wibox: Import some wibox documentation. 2016-05-15 17:17:12 -04:00
Emmanuel Lepage Vallee 77380eb121 wibox: Move the documentation to a shared file
To be re-used by wibars, tooltips and menus
2016-05-15 17:17:12 -04:00
Emmanuel Lepage Vallee 833ad952f6 awful.wibox: Port to the placement API 2016-05-15 17:17:12 -04:00
Emmanuel Lepage Vallee 50c97ed167 placement: Add a callback to detach the placement function 2016-05-15 17:17:12 -04:00
Emmanuel Lepage Vallee 21c9766aa6 placement: Fix under_mouse
The function stopped actually setting the geometry...

This was missed by tests because of an oversaw elsewhere.
2016-05-15 17:17:12 -04:00
Emmanuel Lepage Vallee 45ff7efce5 placement: Support 'attach' in composited placement functions 2016-05-15 17:17:11 -04:00
Emmanuel Lepage Vallee e78a07574b placement: Do not forward the args in get_parent_geometry
The args are for 'd', not the parent.
2016-05-15 17:17:11 -04:00
Emmanuel Lepage Vallee c490ca3803 placement: Fix margin support
This was only partially implemented. The margins were substracted from
the area too early in the pipeline. Now, they are added when getting
the size and substracted when setting it. This way, the margins will
"survive" when a placement function set an absolute value in one of
the field. Previously, this caused one (or more) of the margins to
be lost.
2016-05-15 17:17:11 -04:00
Emmanuel Lepage Vallee a141dbfd06 wibox: Add screen properties 2016-05-15 17:17:11 -04:00
Emmanuel Lepage Vallee 129b3b1d50 wibox: Add wibox property support
Just like the miss handler system, but for wiboxes.

This will simplify the API as there was a mix of properties
and accessors in the API doc.
2016-05-15 17:17:09 -04:00
Emmanuel Lepage Vallee 9a72062cac wibox: Turn into "real" objects.
Before this commit, it was necessary to call 'rawset' to be
able to add new fields to the wibox. This is no longer required.

This solution was choosen because wibox is itself a base class of
menus and wibars. Those classes can now add new properties without
hacks.
2016-05-15 17:15:55 -04:00
Emmanuel Lepage Vallee 43ef623dc6 client: Add x, y, width and height properties 2016-05-15 17:15:55 -04:00
Emmanuel Lepage Vallee 25f4f24791 layoutbox: Fix a leak with Lua 5.1 and luajit
Fixes #808
2016-05-15 17:15:55 -04:00
Emmanuel Lepage Vallee df6bc2f6bc wibox: Make the table argument optional
For consistency with other objects.
2016-05-15 17:15:55 -04:00
Emmanuel Lepage Vallée f9fa8538b9 Merge pull request #909 from psychon/screen-getbycoord
Fix awful.screen.getbycoord
2016-05-15 16:02:03 -04:00
Jajauma 4d7e8c804e naughty: change action markup to emphasize clickability
This commit changes the markup applied to the action description text to
emphasize the fact that the action zone is actually clickable. Bold is
replaced with underline, the Unicode 261B symbol (right pointer) is
added as well.
2016-05-15 18:46:09 +03:00
Jajauma b1dbbb0041 naughty: display the client-supplied localized action description in UI
According to the Desktop Notification specification document [1] the
clients supply actions available along with a notification in a form of
a list of pairs where first element is an identifier of an action and
the second is a localized message that will be displayed to the user.

Up to now the naughty code directly used the action identifier text as a
part of the notification layout exposed to the user. This commit makes
use of a localized action description for that purpose.

1) https://developer.gnome.org/notification-spec/
2016-05-15 18:43:25 +03:00
Uli Schlachter 7d792cea7d Merge branch 'allow-to-disable-history-tracking' of https://github.com/awesomewm/awesome 2016-05-15 16:47:57 +02:00
Uli Schlachter 8b3f263de3 Merge branch 'traceback-with-failed-to-load-error' of https://github.com/blueyed/awesome 2016-05-15 16:31:14 +02:00
Uli Schlachter c71b3d9f38 Merge branch 'wallpaper-while-randr-change' of https://github.com/psychon/awesome 2016-05-15 16:16:40 +02:00
Uli Schlachter ae738db58a Fix awful.screen.getbycoord when no screens exist
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-15 14:43:25 +02:00
Uli Schlachter 13bce88fa0 Fix awful.screen.getbycoord() for top-left corner of a screen
The problem was that get_square_distance() made the screen one pixel larger to
the bottom/right than it really was. Thus, the (x+0,y+0)-pixel of a screen that
was below or to the right of some other screen had distance zero to both of
these screens.

This commit fixes the screen size computation and adds a small unit test for
getbycoord() and get_square_distance().

Reported by Elv13 here:
https://github.com/awesomeWM/awesome/pull/878#issuecomment-219272864

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-15 14:40:00 +02:00
Daniel Hahler 11f3c7b8af awful.client.history: allow to disable history tracking
Based on the code from Uli Schlachter at
https://github.com/awesomeWM/awesome/issues/572#issuecomment-160080378.

Fixes https://github.com/awesomeWM/awesome/issues/572.
2016-05-14 17:42:01 +02:00
Daniel Hahler c25c0527a6 gears.surface: add a traceback for "Failed to load" errors
This is useful to see where the error is coming from.
2016-05-11 21:50:02 +02:00