[statusbar] Respect width paramater on creation
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
21ae849d9f
commit
968a9080c5
|
@ -171,6 +171,7 @@ statusbar_position_update(statusbar_t *statusbar, position_t position)
|
||||||
{
|
{
|
||||||
case Right:
|
case Right:
|
||||||
case Left:
|
case Left:
|
||||||
|
if(statusbar->width <= 0)
|
||||||
statusbar->width = area.height;
|
statusbar->width = area.height;
|
||||||
statusbar->sw =
|
statusbar->sw =
|
||||||
simplewindow_new(globalconf.connection, statusbar->phys_screen, 0, 0,
|
simplewindow_new(globalconf.connection, statusbar->phys_screen, 0, 0,
|
||||||
|
@ -188,6 +189,7 @@ statusbar_position_update(statusbar_t *statusbar, position_t position)
|
||||||
dw);
|
dw);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
if(statusbar->width <= 0)
|
||||||
statusbar->width = area.width;
|
statusbar->width = area.width;
|
||||||
statusbar->sw =
|
statusbar->sw =
|
||||||
simplewindow_new(globalconf.connection, statusbar->phys_screen, 0, 0,
|
simplewindow_new(globalconf.connection, statusbar->phys_screen, 0, 0,
|
||||||
|
|
Loading…
Reference in New Issue