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>
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
to reproduce:
1) spawn an xterm
2) enter 'sleep 10 && killall xterm'
3) start moving the terminal
There will be an error
(found by a yet to be commited integration test)
This module is partly broken since 2009 (the way to use it that is mentioned in
the docs doesn't actually work) because the mousefinder object doesn't have a
find()-method (the line doing "self.find = find" should do "self.finder =
finder.find"). Since no one really noticed, this module is apparently not used
much.
When someone wants to still use this, they are free to copy this to their own
config. It's not much code, but it's enough code that I am annoyed that we ship
something broken to users. Everyone who copies it to their own config will make
sure it works the way they want.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This is basically an initial stab for some modules and some
experimenting with the `@classmod` directive.
For most of the docs only basic transforming was done.
At the moment the tooltip module looks the best.
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>