From 539636c77ec8ea63d234b14cf039c98279b1ab59 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 14 Mar 2008 18:03:40 +0100 Subject: [PATCH] Fix bug with floating windows and titlebar --- client.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/client.c b/client.c index 6df25ee0..c47c7203 100644 --- a/client.c +++ b/client.c @@ -601,14 +601,20 @@ client_resize(Client *c, area_t geometry) if(!c->ismax) c->f_geometry = geometry; - if(c->titlebar.position) + if(c->titlebar.sw) { - simplewindow_move_resize(c->titlebar.sw, - geometry.x, - geometry.y - c->titlebar.sw->geometry.height, - geometry.width, - c->titlebar.sw->geometry.height); - + switch(c->titlebar.position) + { + case Top: + simplewindow_move_resize(c->titlebar.sw, + geometry.x, + geometry.y - c->titlebar.sw->geometry.height, + geometry.width, + c->titlebar.sw->geometry.height); + break; + default: + break; + } client_updatetitlebar(c); } }