Commit Graph

1373 Commits

Author SHA1 Message Date
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 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 Vallée f9fa8538b9 Merge pull request #909 from psychon/screen-getbycoord
Fix awful.screen.getbycoord
2016-05-15 16:02:03 -04: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 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
Emmanuel Lepage Vallee ca02ec1bbe widget.button: Release the button when the mouse leave
This isn't correct, but it avoid a bug where the button stay
pressed forever if the mouse leave while it's pressed.
2016-05-10 16:06:46 -04:00
Uli Schlachter c62da0dcc7 Merge branch 'fake-screen2' of https://github.com/psychon/awesome 2016-05-09 18:40:50 +02:00
Uli Schlachter 4c9280d2bb Merge branch 'no-screens' of https://github.com/psychon/awesome 2016-05-09 18:40:35 +02:00
Uli Schlachter 5b1f8cd35c Emit more signals when removing a screen's tags
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 15:01:05 +02:00
Uli Schlachter 975aac5c0c awful.tag: Delete a screen's tag on removal
Any clients with these tags end up somewhere random (the first tag on the first
remaining screen). This certainly can be improved in the future, but at least
this is a start.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 14:52:31 +02:00
Uli Schlachter 851e0065fe awful.tag.object.delete: Delete a tag's data
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 14:52:31 +02:00
Uli Schlachter a641d88d4e awful.tag.object.delete: Add option to force deletion
When this force-argument is not given, the code will refuse to delete a tag
which has a non-sticky client. With this force argument, the client will just be
moved to the fallback tag.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 14:52:31 +02:00
Uli Schlachter 962a73c18c awful.tag.object.delete: Remove dead code
The case fallback_tag == nil was already checked some lines above.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 14:52:31 +02:00
Uli Schlachter b0038c8ddb awful.autofocus: Skip invalid screens
This code uses delayed calls to lazily update things. Thanks to this, it can try
to update a screen long after it was removed. Fix this by just doing nothing on
invalid screens.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 14:52:31 +02:00
Uli Schlachter bc9b3ca751 tasklist: Stop updating after a screen was invalidated
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 14:52:31 +02:00
Uli Schlachter 5390913f5a taglist: Stop updating after a screen was invalidated
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 14:52:31 +02:00
Emmanuel Lepage Vallée 504018343b Merge pull request #873 from Elv13/geometry_overhaul_p3.01
Geometry overhaul p3.01
2016-05-05 16:23:11 -04:00
Emmanuel Lepage Vallee 3945f13fc4 placement: Fix an semi-infinite loop when attaching to geometries
It would add a new connection each time and eventually get very
slow.

An regression test will be published later.
2016-05-04 23:47:44 -04:00
Emmanuel Lepage Vallee 58ecc69af8 mouse: Add 'current_widget' 2016-05-04 17:25:05 -04:00
Emmanuel Lepage Vallee cf0a4b42b4 mouse: Add `current_widgets` 2016-05-04 17:25:05 -04:00
Emmanuel Lepage Vallee c1fc222d89 mouse: Fix `current_wibox` 2016-05-04 17:25:05 -04:00
Daniel Hahler 7bd9cd7fd1 doc: fix usage of "mouse.move" as a string (#871)
Ref: https://github.com/awesomeWM/awesome/issues/834#issuecomment-216141389.
2016-05-03 12:06:50 +02:00
Daniel Hahler 6b6cbf4a1f Merge pull request #828 from psychon/screen-scan2
Stop restarting on RandR changes
2016-05-01 17:00:05 +02:00
Uli Schlachter 9a42ae87cf awful.wibox: Handle screen removal
When a screen is removed, awful.wibox now hides all wiboxes that it created for
this screen.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-01 10:12:04 +02:00
Uli Schlachter ac81a8df1f c.to_selected_tags(): Handle screenless clients
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-01 10:09:26 +02:00
Emmanuel Lepage Vallée dbd0931343 Merge pull request #844 from Elv13/geometry_overhaul_p2
Geometry overhaul part 2.5
2016-04-30 23:29:29 -04:00
Emmanuel Lepage Vallee 3dab42e6a2 mouse: Restore support for layouts with their own mousegrabber 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee cd632e4a84 mouse.dragtotag: Fix and port to the new move API
It wasn't really working as it would in other WM. It might have
been a feature, but I got the behavior in line with KDE and Gnome.
2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee a62e749216 mouse.snap: Add some configuration options 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee e31563b056 mouse.move: Return the corner 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee a39b93f2e3 mouse: Add is_*_mouse_button_pressed helper properties. 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee e78ad709e7 doc: Move request:: handler to their own documentation section 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee 47fffb5eee mouse: Add current_client property
It is called wibox instead of drawin because from the user
point of view, it will be a wibox anyway.
2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee fc2d359722 doc: Add a coords example
This forced the `coords()` documentation to be moved to Lua.
Keeping it in the C file caused yet another example CMake hack.
2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee 800b8c7d4a doc: Merge awful.mouse and mouse documentation pages
Just like client, tag and screen, this is to avoid new users some
confusing implementation details.
2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee 0b6cd90dce mouse: Implement the Lua custom property handler 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee f0546b900d tests: Improve the placement compositing tests 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee 07e1b975a7 mouse.snap: Use a composed placement function 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee 1802e9e2fe awful.placement: Add a `scale` function 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee 80ee4e9f5d awful.mouse.snap: Add a visual cue 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee 91cdc4a899 awful.mouse.snap: Support windows 7 style screen edges snap 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee baec2efe2d awful.mouse.move: Fix snapping support 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee 86ca6222e2 awful.mouse.snap: Add a configurable default distance 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee 2624370cc0 awful.mouse: Move snap into a submodule 2016-04-30 04:27:34 -04:00