Fix various metrics problems with titlebar
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
dd71f55469
commit
99d72010c5
18
client.c
18
client.c
|
@ -374,15 +374,27 @@ client_manage(Window w, XWindowAttributes *wa, int screen)
|
|||
|
||||
switch(c->titlebar.position)
|
||||
{
|
||||
default:
|
||||
case Top:
|
||||
c->titlebar.sw = simplewindow_new(globalconf.display,
|
||||
phys_screen, 0, 0,
|
||||
phys_screen,
|
||||
c->geometry.x,
|
||||
c->geometry.y - titlebar_height,
|
||||
c->geometry.width + 2 * c->border,
|
||||
titlebar_height,
|
||||
0);
|
||||
break;
|
||||
case Bottom:
|
||||
c->titlebar.sw = simplewindow_new(globalconf.display,
|
||||
phys_screen,
|
||||
c->geometry.x,
|
||||
c->geometry.y + c->geometry.height + 2 * c->border,
|
||||
c->geometry.width + 2 * c->border,
|
||||
titlebar_height,
|
||||
0);
|
||||
break;
|
||||
case Auto:
|
||||
case Off:
|
||||
break;
|
||||
default:
|
||||
c->titlebar.position = Off;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -70,14 +70,14 @@ titlebar_update_geometry_floating(Client *c)
|
|||
simplewindow_move_resize(c->titlebar.sw,
|
||||
c->geometry.x,
|
||||
c->geometry.y - c->titlebar.sw->geometry.height,
|
||||
c->geometry.width,
|
||||
c->geometry.width + 2 * c->border,
|
||||
c->titlebar.sw->geometry.height);
|
||||
break;
|
||||
case Bottom:
|
||||
simplewindow_move_resize(c->titlebar.sw,
|
||||
c->geometry.x,
|
||||
c->geometry.y + c->geometry.height + 2 * c->border,
|
||||
c->geometry.width,
|
||||
c->geometry.width + 2 * c->border,
|
||||
c->titlebar.sw->geometry.height);
|
||||
break;
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ titlebar_update_geometry(Client *c, area_t geometry)
|
|||
simplewindow_move_resize(c->titlebar.sw,
|
||||
geometry.x,
|
||||
geometry.y,
|
||||
geometry.width,
|
||||
geometry.width + 2 * c->border,
|
||||
c->titlebar.sw->geometry.height);
|
||||
geometry.y += c->titlebar.sw->geometry.height;
|
||||
geometry.height -= c->titlebar.sw->geometry.height;
|
||||
|
@ -106,7 +106,7 @@ titlebar_update_geometry(Client *c, area_t geometry)
|
|||
simplewindow_move_resize(c->titlebar.sw,
|
||||
geometry.x,
|
||||
geometry.y + geometry.height + 2 * c->border,
|
||||
geometry.width,
|
||||
geometry.width + 2 * c->border,
|
||||
c->titlebar.sw->geometry.height);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue