At 1244292328 time_t, Uli Schlachter wrote: > I'm just a human.... Attached is a New and Improved (tm) version of this first > patch.
Me too, ignore my previous mail. > --- > lib/awful/wibox.lua.in | 11 +++++++++-- > wibox.c | 4 ++-- > 2 files changed, 11 insertions(+), 4 deletions(-) > > diff --git a/lib/awful/wibox.lua.in b/lib/awful/wibox.lua.in > index 190caea..939f52e 100644 > --- a/lib/awful/wibox.lua.in > +++ b/lib/awful/wibox.lua.in > @@ -237,14 +237,21 @@ function new(arg) > -- Empty position and align in arg so we are passing deprecation warning > arg.position = nil > > + -- Set default size > + if position == "left" or position == "right" then > + arg.width = arg.width or capi.awesome.font_height * 1.5 > + arg.height = arg.height or 100 > + else > + arg.width = arg.width or 100 > + arg.height = arg.height or capi.awesome.font_height * 1.5 > + end > + > local w = capi.wibox(arg) > > if position == "left" then > w.orientation = "north" > - w:geometry({ width = capi.awesome.font_height * 1.5 }) > elseif position == "right" then > w.orientation = "south" > - w:geometry({ width = capi.awesome.font_height * 1.5 }) > end > > w.screen = arg.screen or 1 Now I understand this patch. Ok. > diff --git a/wibox.c b/wibox.c > index 69009c9..a54634c 100644 > --- a/wibox.c > +++ b/wibox.c > @@ -488,8 +488,8 @@ luaA_wibox_new(lua_State *L) > w->sw.border.width = luaA_getopt_number(L, 2, "border_width", 0); > w->sw.geometry.x = luaA_getopt_number(L, 2, "x", 0); > w->sw.geometry.y = luaA_getopt_number(L, 2, "y", 0); > - w->sw.geometry.width = luaA_getopt_number(L, 2, "width", 100); > - w->sw.geometry.height = luaA_getopt_number(L, 2, "height", > globalconf.font->height * 1.5); > + w->sw.geometry.width = luaA_getopt_number(L, 2, "width", 0); > + w->sw.geometry.height = luaA_getopt_number(L, 2, "height", 0); Is that really needed? Because 0 is invalid, so it seems bad to set this by default. -- Julien Danjou // ᐰ <jul...@danjou.info> http://julien.danjou.info // 9A0D 5FD9 EB42 22F6 8974 C95C A462 B51E C2FE E5CD // Ferns will rule the world.
signature.asc
Description: Digital signature