At 1259328032 time_t, Uli Schlachter wrote: > In that case we'd have to call wibox_refresh() again, don't we? (Or loop over > all wiboxes in wibox_refresh() until none got need_update set) > > B got A as parent, both got need_update set: > - - A is updated > - - B is updated which causes A's need_update to be set, but we won't be > looking > at A's need_update flag until after the next main loop?
Yeah. We probably need to render wiboxes recursively following the tree. Seems more optimized. I did not see that because my wiboxes are created in good order, actually. > Does a wibox only know about its parents or is there also a list of childs? If > yes we could do the repainting recursively: > > - - wibox_refresh() calls some "refresh" function on top-level wiboxes and > just > skips the rest. > - - This "refresh" function calls "refresh" for all children. If one of them > was > repainted or need_refresh is set, this wibox is repainted. > - - If this wibox was repainted we return true, else false. Yes, this is what I was saying. There's a chilrens array in all windows (so wiboxes) with childrens list (where order in that array is used for stacking). > I'm not saying you must do it like this, but it would avoid the bug that I > outlined above (can that bug happen at all?) without repainting wiboxes more > than once per main loop. Yes I think it can happen. -- Julien Danjou // ᐰ <[email protected]> http://julien.danjou.info // 9A0D 5FD9 EB42 22F6 8974 C95C A462 B51E C2FE E5CD // The more we fly, the more we climb, the more we know that heaven is a lie.
signature.asc
Description: Digital signature
