From 903555e502ebc7357f37ff72a88f44449da9848f Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 11 Jan 2008 17:54:48 +0100 Subject: [PATCH] better fix for max windows --- client.c | 12 ++++++------ widgets/focustitle.c | 2 +- widgets/tasklist.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/client.c b/client.c index ed528a1fe..e541d1a88 100644 --- a/client.c +++ b/client.c @@ -518,8 +518,10 @@ client_resize(Client *c, Area geometry, Bool sizehints) c->geometry.height = wc.height = geometry.height; wc.border_width = c->border; - if(c->isfloating || - get_current_layout(new_screen)->arrange == layout_floating) + /* save the floating geometry if the window is floating but not + * maximized */ + if((c->isfloating || + get_current_layout(new_screen)->arrange == layout_floating) && !c->ismax) c->f_geometry = geometry; XConfigureWindow(globalconf.display, c->win, @@ -884,11 +886,9 @@ client_maximize(Client *c, Area geometry) { c->wasfloating = c->isfloating; c->m_geometry = c->geometry; - c->isfloating = False; + if(get_current_layout(c->screen)->arrange != layout_floating) + c->isfloating = True; client_resize(c, geometry, False); - /* set floating after resizing so it won't save - * coords */ - c->isfloating = True; restack(c->screen); widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS); } diff --git a/widgets/focustitle.c b/widgets/focustitle.c index f647da529..b92e93ade 100644 --- a/widgets/focustitle.c +++ b/widgets/focustitle.c @@ -61,7 +61,7 @@ focustitle_draw(Widget *widget, DrawCtx *ctx, int offset, int used) d->align, widget->font->height / 2, widget->font, sel->name, d->fg, d->bg); - if(sel->isfloating) + if(sel->isfloating || sel->ismax) draw_circle(ctx, widget->area.x, widget->area.y, (widget->font->height + 2) / 4, sel->ismax, d->fg); diff --git a/widgets/tasklist.c b/widgets/tasklist.c index dd4bc3840..f7227916c 100644 --- a/widgets/tasklist.c +++ b/widgets/tasklist.c @@ -130,7 +130,7 @@ tasklist_draw(Widget *widget, DrawCtx *ctx, int offset, int used) d->align, widget->font->height / 2, widget->font, c->name, d->fg, d->bg); - if(c->isfloating) + if(c->isfloating || c->ismax) draw_circle(ctx, widget->area.x + icon_width + box_width * i, widget->area.y, (widget->font->height + 2) / 4,