better fix for max windows
This commit is contained in:
parent
a28c052af2
commit
903555e502
12
client.c
12
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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue