ewmh.activate: make hints optional

Ref: https://github.com/awesomeWM/awesome/pull/441.

Closes https://github.com/awesomeWM/awesome/pull/444.
This commit is contained in:
Daniel Hahler 2015-09-10 20:45:29 +02:00
parent ca9242da4b
commit 6d8347df90
1 changed files with 3 additions and 3 deletions

View File

@ -157,11 +157,11 @@ end
-- --
-- @client c A client to use -- @client c A client to use
-- @tparam string context The context where this signal was used. -- @tparam string context The context where this signal was used.
-- @tparam table hints A table with additional hints: -- @tparam[opt] table hints A table with additional hints:
-- @tparam boolean hints.raise should the client be raised? (default false) -- @tparam[opt=false] boolean hints.raise should the client be raised?
function ewmh.activate(c, context, hints) function ewmh.activate(c, context, hints)
client.focus = c client.focus = c
if hints.raise then if hints and hints.raise then
if awesome.startup or c:isvisible() then if awesome.startup or c:isvisible() then
c:raise() c:raise()
else else