minor: code style and comment fixes

This commit is contained in:
Daniel Hahler 2017-02-15 23:36:48 +01:00 committed by Yauhen Kirylau
parent 52011a68e1
commit bd02ee8558
2 changed files with 15 additions and 15 deletions

View File

@ -246,7 +246,7 @@ local context_mapper = {
function ewmh.geometry(c, context, hints) function ewmh.geometry(c, context, hints)
local layout = c.screen.selected_tag and c.screen.selected_tag.layout or nil local layout = c.screen.selected_tag and c.screen.selected_tag.layout or nil
-- Setting the geometry wont work unless the client is floating. -- Setting the geometry will not work unless the client is floating.
if (not c.floating) and (not layout == asuit.floating) then if (not c.floating) and (not layout == asuit.floating) then
return return
end end
@ -266,15 +266,15 @@ function ewmh.geometry(c, context, hints)
-- floating client resize) -- floating client resize)
if aplace[context] then if aplace[context] then
-- Check if it correspond to a boolean property -- Check if it corresponds to a boolean property.
local state = c[original_context] local state = c[original_context]
-- If the property is boolean and it correspond to the undo operation, -- If the property is boolean and it corresponds to the undo operation,
-- restore the stored geometry. -- restore the stored geometry.
if state == false then if state == false then
local original = repair_geometry_lock local original = repair_geometry_lock
repair_geometry_lock = true repair_geometry_lock = true
aplace.restore(c,{context=context}) aplace.restore(c, {context=context})
repair_geometry_lock = original repair_geometry_lock = original
return return
end end

View File

@ -1,7 +1,7 @@
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
--- An extandable mouse resizing handler. --- An extendable mouse resizing handler.
-- --
-- This module offer a resizing and moving mechanism for drawable such as -- This module offers a resizing and moving mechanism for drawables such as
-- clients and wiboxes. -- clients and wiboxes.
-- --
-- @author Emmanuel Lepage Vallee <elv1313@gmail.com> -- @author Emmanuel Lepage Vallee <elv1313@gmail.com>
@ -43,8 +43,8 @@ local cursors = {
--- Set the resize mode. --- Set the resize mode.
-- The available modes are: -- The available modes are:
-- --
-- * **live**: Resize the layout everytime the mouse move -- * **live**: Resize the layout everytime the mouse moves.
-- * **after**: Resize the layout only when the mouse is released -- * **after**: Resize the layout only when the mouse is released.
-- --
-- Some clients, such as XTerm, may lose information if resized too often. -- Some clients, such as XTerm, may lose information if resized too often.
-- --
@ -93,10 +93,10 @@ end
-- --
-- Valid `args` are: -- Valid `args` are:
-- --
-- * *enter_callback*: A function called before the `mousegrabber` start -- * *enter_callback*: A function called before the `mousegrabber` starts.
-- * *move_callback*: A function called when the mouse move -- * *move_callback*: A function called when the mouse moves.
-- * *leave_callback*: A function called before the `mousegrabber` is released -- * *leave_callback*: A function called before the `mousegrabber` is released.
-- * *mode*: The resize mode -- * *mode*: The resize mode.
-- --
-- @function awful.mouse.resize -- @function awful.mouse.resize
-- @tparam client client A client -- @tparam client client A client
@ -186,7 +186,7 @@ local function handler(_, client, context, args) --luacheck: no unused_args
if args.mode == "live" then if args.mode == "live" then
-- Ask the resizing handler to resize the client -- Ask the resizing handler to resize the client
client:emit_signal( req, context, geo) client:emit_signal(req, context, geo)
end end
-- Quit when the button is released -- Quit when the button is released
@ -202,7 +202,7 @@ local function handler(_, client, context, args) --luacheck: no unused_args
geo = args.placement(client, args) geo = args.placement(client, args)
-- Ask the resizing handler to resize the client -- Ask the resizing handler to resize the client
client:emit_signal( req, context, geo) client:emit_signal(req, context, geo)
end end
geo = nil geo = nil
@ -220,7 +220,7 @@ local function handler(_, client, context, args) --luacheck: no unused_args
-- In case it was modified -- In case it was modified
setmetatable(geo,{__index=args}) setmetatable(geo,{__index=args})
client:emit_signal( req, context, geo) client:emit_signal(req, context, geo)
return false return false
end, cursor) end, cursor)