Disable titlebar on fullscreen/maximize
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
2045c811e2
commit
b946119d46
12
client.c
12
client.c
|
@ -949,33 +949,35 @@ uicb_client_kill(int screen __attribute__ ((unused)), char *arg __attribute__ ((
|
||||||
static void
|
static void
|
||||||
client_maximize(Client *c, area_t geometry)
|
client_maximize(Client *c, area_t geometry)
|
||||||
{
|
{
|
||||||
|
|
||||||
if((c->ismax = !c->ismax))
|
if((c->ismax = !c->ismax))
|
||||||
{
|
{
|
||||||
|
/* disable titlebar */
|
||||||
|
c->titlebar.position = Off;
|
||||||
c->wasfloating = c->isfloating;
|
c->wasfloating = c->isfloating;
|
||||||
c->m_geometry = c->geometry;
|
c->m_geometry = c->geometry;
|
||||||
if(layout_get_current(c->screen)->arrange != layout_floating)
|
if(layout_get_current(c->screen)->arrange != layout_floating)
|
||||||
client_setfloating(c, True);
|
client_setfloating(c, True);
|
||||||
client_focus(c, c->screen, True);
|
client_focus(c, c->screen, True);
|
||||||
client_resize(c, geometry, False);
|
client_resize(c, geometry, False);
|
||||||
widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS);
|
return;
|
||||||
}
|
}
|
||||||
else if(c->wasfloating)
|
else if(c->wasfloating)
|
||||||
{
|
{
|
||||||
|
c->titlebar.position = c->titlebar.dposition;
|
||||||
client_setfloating(c, True);
|
client_setfloating(c, True);
|
||||||
client_resize(c, c->m_geometry, False);
|
client_resize(c, c->m_geometry, False);
|
||||||
widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS);
|
|
||||||
}
|
}
|
||||||
else if(layout_get_current(c->screen)->arrange == layout_floating)
|
else if(layout_get_current(c->screen)->arrange == layout_floating)
|
||||||
{
|
{
|
||||||
|
c->titlebar.position = c->titlebar.dposition;
|
||||||
client_resize(c, c->m_geometry, False);
|
client_resize(c, c->m_geometry, False);
|
||||||
widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
c->titlebar.position = c->titlebar.dposition;
|
||||||
client_setfloating(c, False);
|
client_setfloating(c, False);
|
||||||
widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS);
|
|
||||||
}
|
}
|
||||||
|
widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Toggle maximize for client
|
/** Toggle maximize for client
|
||||||
|
|
4
ewmh.c
4
ewmh.c
|
@ -253,6 +253,8 @@ ewmh_process_state_atom(Client *c, Atom state, int set)
|
||||||
{
|
{
|
||||||
/* restore geometry */
|
/* restore geometry */
|
||||||
geometry = c->m_geometry;
|
geometry = c->m_geometry;
|
||||||
|
/* restore borders and titlebar */
|
||||||
|
c->titlebar.position = c->titlebar.dposition;
|
||||||
c->border = c->oldborder;
|
c->border = c->oldborder;
|
||||||
c->ismax = False;
|
c->ismax = False;
|
||||||
client_setfloating(c, c->wasfloating);
|
client_setfloating(c, c->wasfloating);
|
||||||
|
@ -263,6 +265,8 @@ ewmh_process_state_atom(Client *c, Atom state, int set)
|
||||||
/* save geometry */
|
/* save geometry */
|
||||||
c->m_geometry = c->geometry;
|
c->m_geometry = c->geometry;
|
||||||
c->wasfloating = c->isfloating;
|
c->wasfloating = c->isfloating;
|
||||||
|
/* disable titlebar and borders */
|
||||||
|
c->titlebar.position = Off;
|
||||||
c->oldborder = c->border;
|
c->oldborder = c->border;
|
||||||
c->border = 0;
|
c->border = 0;
|
||||||
c->ismax = True;
|
c->ismax = True;
|
||||||
|
|
Loading…
Reference in New Issue