- This avoids a nasty issue with fullheight toolbars.
---
lib/awful/mouse.lua.in | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/lib/awful/mouse.lua.in b/lib/awful/mouse.lua.in
index 0c85b7d..61e1f6b 100644
--- a/lib/awful/mouse.lua.in
+++ b/lib/awful/mouse.lua.in
@@ -64,22 +64,29 @@ local function snap_outside(g, sg, snap)
end
local function snap_inside(g, sg, snap)
- local edge = "none"
+ local edgev = 'none'
+ local edgeh = 'none'
if math.abs(g.x) < snap + sg.x and g.x > sg.x then
- edge = "left"
+ edgev = 'left'
g.x = sg.x
elseif math.abs((sg.x + sg.width) - (g.x + g.width)) < snap then
- edge = "right"
+ edgev = 'right'
g.x = sg.x + sg.width - g.width
end
if math.abs(g.y) < snap + sg.y and g.y > sg.y then
- edge = "top"
+ edgeh = 'top'
g.y = sg.y
elseif math.abs((sg.y + sg.height) - (g.y + g.height)) < snap then
- edge = "bottom"
+ edgeh = 'bottom'
g.y = sg.y + sg.height - g.height
end
- return g, edge
+
+ -- What is the dominant dimension?
+ if g.width > g.height then
+ return g, edgeh
+ else
+ return g, edgev
+ end
end
--- Snap a client to the closest client or screen edge.
--
1.6.1.2
--
To unsubscribe, send mail to [email protected].