From e37efaeb8ad33693002280d6cea5c2c133639c78 Mon Sep 17 00:00:00 2001 From: "Ignas Anikevicius (gns_ank)" Date: Thu, 1 Mar 2012 03:46:48 +0000 Subject: [PATCH] awful: ewmh.lua Fix unmaximization (#964) This makes awful not to overwrite the saved geometry by just storing the two geometries in separate places. Signed-off-by: Uli Schlachter --- lib/awful/ewmh.lua.in | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/awful/ewmh.lua.in b/lib/awful/ewmh.lua.in index f0262e3ba..3ad5acc4c 100644 --- a/lib/awful/ewmh.lua.in +++ b/lib/awful/ewmh.lua.in @@ -27,14 +27,14 @@ end -- @param set Set or unset the maximized values. local function maximized_horizontal(window, set) if set then - store_geometry(window, "maximized") + store_geometry(window, "maximized_horizontal") local g = screen[window.screen].workarea window:geometry { width = g.width, x = g.x } - elseif data[window] and data[window].maximized - and data[window].maximized.x - and data[window].maximized.width then - window:geometry { width = data[window].maximized.width, - x = data[window].maximized.x } + elseif data[window] and data[window].maximized_horizontal + and data[window].maximized_horizontal.x + and data[window].maximized_horizontal.width then + local g = data[window].maximized_horizontal + window:geometry { width = g.width, x = g.x } end end @@ -43,14 +43,14 @@ end -- @param set Set or unset the maximized values. local function maximized_vertical(window, set) if set then - store_geometry(window, "maximized") + store_geometry(window, "maximized_vertical") local g = screen[window.screen].workarea window:geometry { height = g.height, y = g.y } - elseif data[window] and data[window].maximized - and data[window].maximized.y - and data[window].maximized.height then - window:geometry { height = data[window].maximized.height, - y = data[window].maximized.y } + elseif data[window] and data[window].maximized_vertical + and data[window].maximized_vertical.y + and data[window].maximized_vertical.height then + local g = data[window].maximized_vertical + window:geometry { height = g.height, y = g.y } end end