awful: don't compare with ws coords

This fails if the window has resize hints or send configure request.

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-08-17 10:14:38 +02:00
parent 065d7f8a86
commit a5cb5a4397
1 changed files with 4 additions and 8 deletions

View File

@ -290,16 +290,12 @@ function client.maximize(c)
local ws = capi.screen[sel.screen].workarea local ws = capi.screen[sel.screen].workarea
ws.width = ws.width - 2 * sel.border_width ws.width = ws.width - 2 * sel.border_width
ws.height = ws.height - 2 * sel.border_width ws.height = ws.height - 2 * sel.border_width
if sel.floating if sel.floating and client.data.maximize[sel] then
and sel.coords.x == ws.x sel.floating = client.data.maximize[sel].floating
and sel.coords.y == ws.y if sel.floating then
and sel.coords.width == ws.width
and sel.coords.height == ws.height then
if client.data.maximize[sel] then
sel.floating = client.data.maximize[sel].floating
sel.coords = client.data.maximize[sel].coords sel.coords = client.data.maximize[sel].coords
client.data.maximize[sel] = nil
end end
client.data.maximize[sel] = nil
else else
client.data.maximize[sel] = { coords = sel.coords, floating = sel.floating } client.data.maximize[sel] = { coords = sel.coords, floating = sel.floating }
sel.floating = true sel.floating = true