-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Gregor Best wrote: > Once again, I'm very thankful for every little bit of advice, so please > review :)
> From a93c80d17c649446b2d80477db8b1dfa7cece886 Mon Sep 17 00:00:00 2001 > From: Gregor Best <farha...@googlemail.com> > Date: Fri, 29 May 2009 01:31:57 +0200 > Subject: [PATCH 3/9] systray: don't crap up on odd-sized windows > > I'll do. Basically, we get the size we want the systray to be drawn at > upon drawing the tray, thus removing the query to the xcb_get_geometry > function. As all windows embedded in the systray are squares, their size > is equal to their height, so we simply force the size to be > wibox_height * n x wibox_height, where n is the number of embedded windows, > instead of deriving it from the largest embedded window (which, for example > in the case of wicd, would be 200x200, way too much for one window on a > regular wibox). > > Signed-off-by: Gregor Best <farha...@googlemail.com> > --- Uhm... "I'll do" in the beginning of a commit message? Copy&paste is nice, but don't forget grammar and context. :P > > From 4bc0fcc388c5e3251f3fa95261967a60731891e5 Mon Sep 17 00:00:00 2001 > From: Gregor Best <farha...@googlemail.com> > Date: Thu, 2 Jul 2009 02:10:32 +0200 > Subject: [PATCH 4/9] awful.widget: add layouts > > Signed-off-by: Gregor Best <farha...@googlemail.com> > --- > +++ b/lib/awful/widget/layout/horizontal.lua.in > +--- Horizontal widget layout > +module("awful.widget.layout.horizontal") > + > +local function horizontal(direction, bounds, widgets, screen) > + local geometries = { } > + local x = 0 > + > + -- we are only interested in tables and widgets > + local keys = util.table.keys_filter(widgets, "table", "widget") Uhm... Why? What are you trying to get rid of? Since util.table.keys_filter() doesn't filter the table recursivly, other stuff can still be hidden in there. Oh and the for loop below checks via type() anyway and ignores all other stuff.. Oh and: Does the C code catch loops in the table? If not I just found an endless loop below... > + for _, k in ipairs(keys) do > + local v = widgets[k] > + if type(v) == "table" then > + local layout = v["layout"] or function (...) return > horizontal(direction, ...) end > + local g = layout(bounds, v, screen) > + for _, v in ipairs(g) do > + v.x = v.x + x > + table.insert(geometries, v) > + end > + bounds = g.free > + x = x + g.free.x > + elseif type(v) == "widget" then > + local g > + if v.visible then > + g = v:extents(screen) > + else > + g = { > + width = 0, > + height = 0, > + } > + end Can't the C code filter invisible widgets or something like that...? (I guess not) Why can widgets be made invisible at all? :( > +function flex(bounds, widgets, screen) [..] > + nelements = (nelements == 0) and 1 or nelements I read this twice and then thought: if nelements == 0 then nelements = 1 end > --- /dev/null > +++ b/lib/awful/widget/layout/vertical.lua.in > @@ -0,0 +1,108 @@ [snip] > +local function vertical(direction, bounds, widgets, screen) [snip] > + -- we are only interested in tables and widgets > + local keys = util.table.keys_filter(widgets, "table", "widget") > + local nelements = #keys > + local height = math.floor(bounds.height / nelements) What if nelements is 0? > Subject: [PATCH 5/9] awesomerc.lua: add support for widget layouts > Subject: [PATCH 6/9] naughty: add support for widget layouts > Subject: [PATCH 7/9] awful.menu: add support for widget layouts > Subject: [PATCH 8/9] invaders: add support for widget layouts > Subject: [PATCH 9/9] titlebar: add widget layout support More than half your patches fix things which you broke, well done! ;) Uli - -- "Do you know that books smell like nutmeg or some spice from a foreign land?" -- Faber in Fahrenheit 451 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQEcBAEBCAAGBQJKVbAfAAoJECLkKOvLj8sGhWEIAISgYOJhWZhnIt7hhEjn9vrA Mpjg2Hw5lRTFS3b3+vFvbFfkmXe6cawrEAk8sIwijLyFfZWM1Qmb+4QMJSjl+mM6 Iq5rE1yG0Wj2f3F1yj2xZNsCmAT2FwV1kbGotZZ3nAzKu2rsJXV7AMG77w9GydJf MSrMlhGHwK5tFycxgCURNLnTw5d9l78grgO5PZOBTeEJtQfMun6XQc7z14WG3hwt NPBBJnSMYgW6+UZEXTGcqJ0TpdzgCgoRYdCAjwonbZk3yQtvPROJVwN758GVirhV xAhdIdS8Tl4my8ZrL0AmX/+nUYyQVm8WDhSXMVRmKs58SscQ+uleEfsg9cIc4C4= =LGOQ -----END PGP SIGNATURE----- -- To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.