Further investigation shows that when base.fit_widget is called on line 69, it is returning a NaN to w.
On Wed, Mar 19, 2014 at 12:51 AM, John Kha <sir...@gmail.com> wrote: > I have been talking with Uli on IRC about this error, and this is what > I have found: There is something wrong with the fit function on line > 83 of fixed.lua. > > After changing the fixed:fit(...) to look like: > > function fixed:fit(orig_width, orig_height) > local width, height = orig_width, orig_height > local used_in_dir, used_max = 0, 0 > > io.stderr:write("Fixed:fit Outer Width: " .. width .. "\n") > for k, v in pairs(self.widgets) do > io.stderr:write("Fixed:fit Inner Width: " .. width .. "\n") > local w, h = base.fit_widget(v, width, height) > local in_dir, max > if self.dir == "y" then > max, in_dir = w, h > height = height - in_dir > else > in_dir, max = w, h > width = width - in_dir > end > if max > used_max then > used_max = max > end > used_in_dir = used_in_dir + in_dir > io.stderr:write("Break?\n") > if width <= 0 or height <= 0 then > if self.dir == "y" then > used_in_dir = orig_height > else > used_in_dir = orig_width > end > io. stderr:write" Break.\n" > break > end > end > > if self.dir == "y" then > return used_max, used_in_dir > end > return used_in_dir, used_max > end > > > a sample of my output looks like: > > Fixed:fit Inner Width: 43 > Break? > Fixed:fit Inner Width: 24 > Break? > Break? > Fixed:fit Inner Width: 5 > Fixed:fit Outer Width: 5 > Fixed:fit Inner Width: 5 > Break? > Break. > Break? > Break. > Fixed:fit Outer Width: 0 > Fixed:fit Inner Width: 0 > Break? > Fixed:fit Inner Width: -nan > Error while drawing widget: > /usr/local/share/awesome/lib/wibox/layout/base.lua:39: table index is > NaN > > > As you can see, the condition should be true as inner width is 0, but > you never get the "Break." > -- > John C. Kha -- John C. Kha -- To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.