From 968a9080c54e68027a21019645bdfa88f4b6728f Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sat, 24 May 2008 09:06:04 +0200 Subject: [PATCH] [statusbar] Respect width paramater on creation Signed-off-by: Julien Danjou --- statusbar.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/statusbar.c b/statusbar.c index 955eee4b9..b6e3b4770 100644 --- a/statusbar.c +++ b/statusbar.c @@ -171,7 +171,8 @@ statusbar_position_update(statusbar_t *statusbar, position_t position) { case Right: case Left: - statusbar->width = area.height; + if(statusbar->width <= 0) + statusbar->width = area.height; statusbar->sw = simplewindow_new(globalconf.connection, statusbar->phys_screen, 0, 0, statusbar->height, statusbar->width, 0); @@ -188,7 +189,8 @@ statusbar_position_update(statusbar_t *statusbar, position_t position) dw); break; default: - statusbar->width = area.width; + if(statusbar->width <= 0) + statusbar->width = area.width; statusbar->sw = simplewindow_new(globalconf.connection, statusbar->phys_screen, 0, 0, statusbar->width, statusbar->height, 0);