+ if g.width < 1 then g.width = 1 end
+ if g.height < 1 then g.height = 1 end
+
+ p.geometries[c] = g
+ end
+ else
+ -- Layout with one fixed column meant for a master window. Its
+ -- width is calculated according to mwfact. Other clients are
+ -- cascaded or "tabbed" in a slave column on the right.
+
+ -- (1) (2) (3) (4)
+ -- +----------+---+ +----------+---+ +----------+---+ +----------+---+
+ -- | | | | | 3 | | | 4 | | +---+|
+ -- | | | -> | | | -> | +---++ -> | +---+|+
+ -- | 1 | 2 | | 1 +---++ | 1 | 3 || | 1 +---+|+|
+ -- | | | | | 2 || | +---++| | +---+|+ |
+ -- | | | | | || | | 2 | | | | 2 |+ |
+ -- +----------+---+ +---------+---++ +--------+---+-+ +------+---+---+
+
+ local mwfact
+ if cascade.tile.mwfact > 0 then
+ mwfact = cascade.tile.mwfact
+ else
+ mwfact = t.master_width_factor
+ end
+
+ -- Make slave windows overlap main window? Do this if ncol is 1.
+ local overlap_main
+ if cascade.tile.ncol > 0 then
+ overlap_main = cascade.tile.ncol
+ else
+ overlap_main = t.column_count
+ end
+
+ -- Minimum space for slave windows? See cascade.tile.lua.
+ local num_c
+ if cascade.tile.nmaster > 0 then
+ num_c = cascade.tile.nmaster
+ else
+ num_c = t.master_count
+ end
+
+ local how_many = (#cls - 1 >= num_c and (#cls - 1)) or num_c
+
+ local current_offset_x = cascade.tile.offset_x * (how_many - 1)
+ local current_offset_y = cascade.tile.offset_y * (how_many - 1)
+
+ if #cls <= 0 then return end
+
+ -- Main column, fixed width and height.
+ local c = cls[1]