From 320f551a5f916901b6002ebc0dd5bfe9d9fcd210 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sat, 21 Nov 2009 10:45:37 +0100 Subject: [PATCH] wibox: check border width Signed-off-by: Julien Danjou --- objects/wibox.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/objects/wibox.c b/objects/wibox.c index 63d65951..88e8c46b 100644 --- a/objects/wibox.c +++ b/objects/wibox.c @@ -1293,12 +1293,12 @@ static int luaA_wibox_set_border_width(lua_State *L, wibox_t *wibox) { wibox_t *w = luaA_checkudata(L, -3, &wibox_class); - uint32_t border_width = luaL_checknumber(L, -1); - if(border_width != w->border_width) + int32_t border_width = luaL_checknumber(L, -1); + if(border_width != w->border_width && border_width >= 0) { if (w->window != XCB_NONE) xcb_configure_window(globalconf.connection, w->window, XCB_CONFIG_WINDOW_BORDER_WIDTH, - &border_width); + (uint32_t[]) { border_width }); w->border_width = border_width; /* Need update if transparent background */ wibox_need_update(w);