THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#1296 - Updated signal causes total relayout
User who did this - Uli Schlachter (psychon)

----------
Is having multiple parents worth it:
Even the default config makes use of this. It's a great feature usability-wise 
IMO.

Paint outside of the dedicated region:
This is orthogonal to this bug report. I'll ignore this for now and at the end 
of the discussion we can think about this.

How can this be solved?
Currently we are lazy and when something says "I changed", everything is 
repainted. This is what you guys want to avoid.

If we throw away multiple parents:
A widget now has a unique geometry. Thus it could say "this part of me changed" 
and layouts would be responsible for correctly transforming this information 
and passing it on. We'd have to split up the relayout and the redraw phase. For 
relayouts I'd continue to be lazy and just re-layout everything followed by 
redrawing everything. It might be possibly to fix this up later on to have less 
redraws needed.
The redraw has to be passed around like it is currently so that things like 
wibox.widget.background continue to work. wibox.layout.base.draw_widget() could 
be made more intelligent and skip the redraw if the widget does not touch any 
dirty area.

If we keep "no unique parent per widget":
This is complicated. We definitely need to split up the relayout and redraw 
phases as well, because input handling needs widget positions and currently 
this is collected during redraw. This just cannot work with partial redraws. 
Due to lazyness, I'd propose keeping the widget::updated signal which means "I 
need relayout and redraw". The wibox could contain a hierachy of widgets and 
when a specific widget is re-layouted, wibox.layout.base.SOME_FUNCTION throws 
away its subtree in this hierachy. For layouts I'd add a widget::redraw signal 
which skips the relayout and only does a redraw. That signal would need to 
contain some damaged area in widget coordinates.
Uhm.... When would we need to relayout without redrawing?
It might be possible to do this without breaking "leaf widgets" that do not try 
to paint other widgets. We'd split things up into two phases. First 
wibox.layout.place_widget + a :layout() method could be used to assign geometry 
to all widgets. In this phase, :fit() can be used the way it is used currently 
to figure out how much space a widget needs. In the second phase :draw() is 
called the way it already works currently.
Uhm... nope. This would break wibox.widget.background. Perhaps two new optional 
callbacks, before_draw_children() and after_draw_children() and the wibox code 
does all the drawing based on the already-computed layout?

I just wrote this down without first thinking about this. What do you guys 
think? Did I forget something? Should I try producing a small proof of concept 
for this?
----------

More information can be found at the following URL:
https://awesome.naquadah.org/bugs/index.php?do=details&task_id=1296#comment4152

You are receiving this message because you have requested it from the Flyspray 
bugtracking system.  If you did not expect this message or don't want to 
receive mails in future, you can change your notification settings at the URL 
shown above.

--
To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.

Reply via email to