Merge pull request #1020 from cmertz/master
restore client.border_width after fullscreen
This commit is contained in:
commit
e8c8a5e7fe
|
@ -278,6 +278,7 @@ local function store_geometry(d, reqtype)
|
||||||
if not data[d][reqtype] then data[d][reqtype] = {} end
|
if not data[d][reqtype] then data[d][reqtype] = {} end
|
||||||
data[d][reqtype] = d:geometry()
|
data[d][reqtype] = d:geometry()
|
||||||
data[d][reqtype].screen = d.screen
|
data[d][reqtype].screen = d.screen
|
||||||
|
data[d][reqtype].border_width = d.border_width
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Get the margins and offset
|
--- Get the margins and offset
|
||||||
|
@ -1161,6 +1162,9 @@ function placement.restore(d, args)
|
||||||
if not memento then return false end
|
if not memento then return false end
|
||||||
|
|
||||||
memento.screen = nil --TODO use it
|
memento.screen = nil --TODO use it
|
||||||
|
|
||||||
|
d.border_width = memento.border_width
|
||||||
|
|
||||||
d:geometry(memento)
|
d:geometry(memento)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
|
@ -41,6 +41,24 @@ local steps = {
|
||||||
c.maximized_horizontal = false
|
c.maximized_horizontal = false
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
-- Test restoring client.border_width
|
||||||
|
function()
|
||||||
|
local c = client.get()[1]
|
||||||
|
|
||||||
|
-- pick an arbitrary border_width distinct from the default one
|
||||||
|
local test_width = c.border_width + 1
|
||||||
|
|
||||||
|
c.border_width = test_width
|
||||||
|
|
||||||
|
c.fullscreen = true
|
||||||
|
c.fullscreen = false
|
||||||
|
|
||||||
|
assert(c.border_width == test_width)
|
||||||
|
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
|
||||||
-- Test restoring a geometry
|
-- Test restoring a geometry
|
||||||
function()
|
function()
|
||||||
local c = client.get()[1]
|
local c = client.get()[1]
|
||||||
|
|
Loading…
Reference in New Issue