Add a function to remove titlebar geometry
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
f47ca7cda7
commit
13168d758a
29
titlebar.c
29
titlebar.c
|
@ -131,6 +131,35 @@ titlebar_geometry_add(Titlebar *t, area_t geometry)
|
|||
return geometry;
|
||||
}
|
||||
|
||||
area_t
|
||||
titlebar_geometry_remove(Titlebar *t, area_t geometry)
|
||||
{
|
||||
if(!t->sw)
|
||||
return geometry;
|
||||
|
||||
switch(t->position)
|
||||
{
|
||||
case Top:
|
||||
geometry.y += t->sw->geometry.height;
|
||||
geometry.height -= t->sw->geometry.height;
|
||||
break;
|
||||
case Bottom:
|
||||
geometry.height -= t->sw->geometry.height;
|
||||
break;
|
||||
case Left:
|
||||
geometry.x += t->sw->geometry.width;
|
||||
geometry.width -= t->sw->geometry.width;
|
||||
break;
|
||||
case Right:
|
||||
geometry.width -= t->sw->geometry.width;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return geometry;
|
||||
}
|
||||
|
||||
void
|
||||
titlebar_update(Client *c)
|
||||
{
|
||||
|
|
|
@ -29,6 +29,7 @@ void titlebar_update(Client *);
|
|||
void titlebar_update_geometry_floating(Client *);
|
||||
area_t titlebar_update_geometry(Client *, area_t);
|
||||
area_t titlebar_geometry_add(Titlebar *, area_t);
|
||||
area_t titlebar_geometry_remove(Titlebar *, area_t);
|
||||
|
||||
Uicb uicb_client_toggletitlebar;
|
||||
|
||||
|
|
Loading…
Reference in New Issue