mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
Disable titlebar on fullscreen/maximize
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
2045c811e2
commit
b946119d46
2 changed files with 11 additions and 5 deletions
12
client.c
12
client.c
|
@ -949,33 +949,35 @@ uicb_client_kill(int screen __attribute__ ((unused)), char *arg __attribute__ ((
|
|||
static void
|
||||
client_maximize(Client *c, area_t geometry)
|
||||
{
|
||||
|
||||
if((c->ismax = !c->ismax))
|
||||
{
|
||||
/* disable titlebar */
|
||||
c->titlebar.position = Off;
|
||||
c->wasfloating = c->isfloating;
|
||||
c->m_geometry = c->geometry;
|
||||
if(layout_get_current(c->screen)->arrange != layout_floating)
|
||||
client_setfloating(c, True);
|
||||
client_focus(c, c->screen, True);
|
||||
client_resize(c, geometry, False);
|
||||
widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS);
|
||||
return;
|
||||
}
|
||||
else if(c->wasfloating)
|
||||
{
|
||||
c->titlebar.position = c->titlebar.dposition;
|
||||
client_setfloating(c, True);
|
||||
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)
|
||||
{
|
||||
c->titlebar.position = c->titlebar.dposition;
|
||||
client_resize(c, c->m_geometry, False);
|
||||
widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS);
|
||||
}
|
||||
else
|
||||
{
|
||||
c->titlebar.position = c->titlebar.dposition;
|
||||
client_setfloating(c, False);
|
||||
widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS);
|
||||
}
|
||||
widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS);
|
||||
}
|
||||
|
||||
/** 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 */
|
||||
geometry = c->m_geometry;
|
||||
/* restore borders and titlebar */
|
||||
c->titlebar.position = c->titlebar.dposition;
|
||||
c->border = c->oldborder;
|
||||
c->ismax = False;
|
||||
client_setfloating(c, c->wasfloating);
|
||||
|
@ -263,6 +265,8 @@ ewmh_process_state_atom(Client *c, Atom state, int set)
|
|||
/* save geometry */
|
||||
c->m_geometry = c->geometry;
|
||||
c->wasfloating = c->isfloating;
|
||||
/* disable titlebar and borders */
|
||||
c->titlebar.position = Off;
|
||||
c->oldborder = c->border;
|
||||
c->border = 0;
|
||||
c->ismax = True;
|
||||
|
|
Loading…
Reference in a new issue