mouse.resize: Handle when there is no selected tag
This should be very rare, but _is_ possible.
This commit is contained in:
parent
4e6283e5ad
commit
722879bcf7
|
@ -218,16 +218,17 @@ function mouse.resize_handler(c, context, hints)
|
|||
if hints and context and context:find("mouse.*") then
|
||||
-- This handler only handle the floating clients. If the client is tiled,
|
||||
-- then it let the layouts handle it.
|
||||
local lay = c.screen.selected_tag.layout
|
||||
local t = c.screen.selected_tag
|
||||
local lay = t and t.layout or nil
|
||||
|
||||
if lay == layout.suit.floating or c.floating then
|
||||
if (lay and lay == layout.suit.floating) or c.floating then
|
||||
c:geometry {
|
||||
x = hints.x,
|
||||
y = hints.y,
|
||||
width = hints.width,
|
||||
height = hints.height,
|
||||
}
|
||||
elseif lay.resize_handler then
|
||||
elseif lay and lay.resize_handler then
|
||||
lay.resize_handler(c, context, hints)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue