awful.layout: do not pass specific param in arrange (FS#541)

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-08-07 15:50:45 +02:00
parent 8a0f2aca28
commit 5a70fb6395
3 changed files with 8 additions and 11 deletions

View File

@ -65,7 +65,6 @@ end
-- Register an arrange hook.
local function on_arrange (screen)
local t = tag.selected(screen)
local p = {}
p.workarea = wibox.get_workarea(screen)
-- Handle padding
@ -78,10 +77,6 @@ local function on_arrange (screen)
end
p.geometry = capi.screen[screen].geometry
p.clients = client.tiled(screen)
p.ncol = tag.getncol(t)
p.nmaster = tag.getnmaster(t)
p.mwfact = tag.getmwfact(t)
p.tagdata = tag.getdata(t)
p.screen = screen
get(screen).arrange(p)
end

View File

@ -23,7 +23,7 @@ function arrange(p)
local area = p.workarea
local cls = p.clients
local focus = capi.client.focus
local mwfact = p.mwfact
local mwfact = tag.getmwfact(tag.selected(p.screen))
local fidx
-- Check that the focused window is on the right screen

View File

@ -9,6 +9,7 @@
-- Grab environment we need
local ipairs = ipairs
local math = math
local tag = require("awful.tag")
--- Tiled layouts module for awful
module("awful.layout.suit.tile")
@ -72,6 +73,7 @@ local function tile_group(cls, wa, orientation, fact, group)
end
local function tile(param, orientation)
local t = tag.selected(param.screen)
orientation = orientation or "right"
-- this handles are different orientations
@ -87,18 +89,18 @@ local function tile(param, orientation)
end
local cls = param.clients
local nmaster = math.min(param.nmaster, #cls)
local nmaster = math.min(tag.getnmaster(t), #cls)
local nother = math.max(#cls - nmaster,0)
local mwfact = param.mwfact
local mwfact = tag.getmwfact(t)
local wa = param.workarea
local ncol = param.ncol
local ncol = tag.getncol(t)
local data = param.tagdata.windowfact
local data = tag.getdata(t).windowfact
if not data then
data = {}
param.tagdata.windowfact = data
tag.getdata(t).windowfact = data
end
local coord = wa[x]