At 1247090952 time_t, Gregor Best wrote:
> It does, because it removes the calculation of the actual text position
> from C. Without that, widget_geometries isn't fully functional, as text
> doesn't get drawn where the layout function decides it should.

Okay.

> Premature optimization is the root of all evil :)

I can't disagree.

> > > +        lua_insert(globalconf.L, lua_gettop(globalconf.L) - 1);
> > > +        lua_pop(globalconf.L, 1);
> > 
> > I think we said that's totally noop, no?
> > [...]
> 
> It is not. lua_insert() needs an absolute stack position, which is why
> the lua_gettop() is used there (-1 would be a relative position). These
> two lines exchange the two top stack elements and then remove the new
> top, effectively removing the second element from the top (which is the
> layout function, it's not needed anymore and it would taint the stack if
> it stayed on top of it).

Yeah, actually I reread your code, and it can be simplified to:
lua_insert(L, -2);
lua_pop(L, 1);

Which also can be simplified to:
lua_remove(L, -2);

AFAICT.

> 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).

I'm not sure you can assume all systray icons are square. But well, I
guess you have a pragmatic approach, so it should work right now. If
something happens, we'll know and we'll fix it. :)

> Totally. This would ease up the implementation quite a bit, I'll do it.

I'm glad that even ease your work. :-)

> It does indeed brake resizable imageboxes, and frankly, I have no idea
> how we could replace that. I think the best idea would be to have things
> settle down and then take a closer look at it.

I agree.

> Would be very nice :)

This bastard does not sounds interested.

Cheers,
-- 
Julien Danjou
// ᐰ <jul...@danjou.info>   http://julien.danjou.info
// 9A0D 5FD9 EB42 22F6 8974  C95C A462 B51E C2FE E5CD
// Don't give up.

Attachment: signature.asc
Description: Digital signature

Reply via email to