From 4a40929d9b1050eb461716b47f9900bcc1265874 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 27 Mar 2008 10:38:33 +0100 Subject: [PATCH] [placement] Fix smart placement with window which had titlebars Signed-off-by: Julien Danjou --- placement.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/placement.c b/placement.c index eada5e0f8..1ebb17af8 100644 --- a/placement.c +++ b/placement.c @@ -113,10 +113,7 @@ placement_smart(Client *c) newgeometry = titlebar_geometry_add(&c->titlebar, newgeometry); newgeometry = placement_fix_offscreen(newgeometry, c->screen, c->border); - - /* restore height and width again */ - newgeometry.width = c->f_geometry.width; - newgeometry.height = c->f_geometry.height; + newgeometry = titlebar_geometry_remove(&c->titlebar, newgeometry); area_list_wipe(&arealist); @@ -140,10 +137,7 @@ placement_under_mouse(Client *c) finalgeometry = titlebar_geometry_add(&c->titlebar, finalgeometry); finalgeometry = placement_fix_offscreen(finalgeometry, c->screen, c->border); - - /* restore height and width */ - finalgeometry.height = c->f_geometry.height; - finalgeometry.width = c->f_geometry.width; + finalgeometry = titlebar_geometry_remove(&c->titlebar, finalgeometry); return finalgeometry; }