awful.rules: Apply floating early

This commit is contained in:
Emmanuel Lepage Vallee 2016-04-18 02:56:25 -04:00
parent 06716df05a
commit c678a0d426
1 changed files with 8 additions and 1 deletions

View File

@ -261,7 +261,7 @@ rules.delayed_properties = {}
local force_ignore = { local force_ignore = {
titlebars_enabled=true, focus=true, screen=true, x=true, titlebars_enabled=true, focus=true, screen=true, x=true,
y=true, width=true, height=true, geometry=true,placement=true, y=true, width=true, height=true, geometry=true,placement=true,
border_width=true, border_width=true,floating=true
} }
function rules.high_priority_properties.tag(c, value) function rules.high_priority_properties.tag(c, value)
@ -379,6 +379,13 @@ function rules.execute(c, props, callbacks)
props.border_width(c, props) or props.border_width props.border_width(c, props) or props.border_width
end end
-- Geometry will only work if floating is true, otherwise the "saved"
-- geometry will be restored.
if props.floating then
c.floating = type(props.floating) == "function" and props.floating(c,props)
or props.floating
end
-- Before requesting a tag, make sure the screen is right -- Before requesting a tag, make sure the screen is right
if props.screen then if props.screen then
c.screen = type(props.screen) == "function" and screen[props.screen(c,props)] c.screen = type(props.screen) == "function" and screen[props.screen(c,props)]