From 524a0c1b35bd5aea12aeb970dfa4007b28658f33 Mon Sep 17 00:00:00 2001 From: "Ignas Anikevicius (gns_ank)" Date: Thu, 1 Mar 2012 23:06:39 +0000 Subject: [PATCH] ewmh.lua: Account for the border-width Previously we were not taking into account the border-width of the client which we ought to as otherwise the client goes of the screen by several pixels. It's slightly more ugly when we have several screens connected. Signed-off-by: Uli Schlachter --- lib/awful/ewmh.lua.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/awful/ewmh.lua.in b/lib/awful/ewmh.lua.in index 3ad5acc4c..6a879e596 100644 --- a/lib/awful/ewmh.lua.in +++ b/lib/awful/ewmh.lua.in @@ -29,7 +29,8 @@ local function maximized_horizontal(window, set) if set then store_geometry(window, "maximized_horizontal") local g = screen[window.screen].workarea - window:geometry { width = g.width, x = g.x } + local bw = window.border_width or 0 + window:geometry { width = g.width - 2*bw, x = g.x } elseif data[window] and data[window].maximized_horizontal and data[window].maximized_horizontal.x and data[window].maximized_horizontal.width then @@ -45,7 +46,8 @@ local function maximized_vertical(window, set) if set then store_geometry(window, "maximized_vertical") local g = screen[window.screen].workarea - window:geometry { height = g.height, y = g.y } + local bw = window.border_width or 0 + window:geometry { height = g.height - 2*bw, y = g.y } elseif data[window] and data[window].maximized_vertical and data[window].maximized_vertical.y and data[window].maximized_vertical.height then