diff --git a/lib/awful/mouse/init.lua b/lib/awful/mouse/init.lua index 9967b4773..609a096ba 100644 --- a/lib/awful/mouse/init.lua +++ b/lib/awful/mouse/init.lua @@ -31,11 +31,16 @@ local mouse = { mouse.object = {} mouse.wibox = {} ---- The default snap distance. +--- The default distance before snapping clients together. -- @tfield integer awful.mouse.snap.default_distance -- @tparam[opt=8] integer default_distance -- @see awful.mouse.snap +--- The default distance before activating screen edge snap. +-- @tfield integer awful.mouse.snap.aerosnap_distance +-- @tparam[opt=16] integer default_distance +-- @see awful.mouse.snap + --- Enable screen edges snapping. -- @tfield[opt=true] boolean awful.mouse.snap.edge_enabled @@ -57,9 +62,9 @@ mouse.wibox = {} -- @beautiful beautiful.snap_shape -- @tparam function shape A `gears.shape` compatible function ---- The gap between snapped contents. +--- The gap between snapped clients. -- @beautiful beautiful.snapper_gap --- @tparam number (default: 0) +-- @tparam[opt=0] number snapper_gap --- Get the client object under the pointer. -- @deprecated awful.mouse.client_under_pointer diff --git a/lib/awful/mouse/snap.lua b/lib/awful/mouse/snap.lua index f28dff447..592bc3b4a 100644 --- a/lib/awful/mouse/snap.lua +++ b/lib/awful/mouse/snap.lua @@ -25,7 +25,8 @@ local capi = { } local module = { - default_distance = 8 + default_distance = 8, + aerosnap_distance = 16 } local placeholder_w = nil @@ -258,7 +259,7 @@ resize.add_move_callback(function(c, geo, args) -- Screen edge snapping (areosnap) if (module.edge_enabled ~= false) and args and (args.snap == nil or args.snap) then - detect_areasnap(c, 16) + detect_areasnap(c, module.aerosnap_distance) end -- Snapping between clients