[PATCH weston 7/8] westoy: Schedule a full resize when we add a subsurface

Jasper St. Pierre jstpierre at mecheye.net
Wed Nov 13 12:55:35 PST 2013


On Wed, Nov 13, 2013 at 3:41 PM, Bill Spitzak <spitzak at gmail.com> wrote:

> Is this to force the commit so that the subsurface appears? It might be
> better to have a direct way to get the commit to happen without redrawing
> the main surface.
>

It's to make sure that the transient's position and size is set, and that
its redraw handler is called and that the subsurface is placed accordingly.
I don't think we care too much about toytoolkit efficiently, so I'm fine
with queueing a full redraw. Feel free to fix it if you feel strongly about
making toytoolkit performant.


> In any case this looks a lot like you are hiding a bug that perhaps should
> be investigated, especially if it is in weston or your compositor, rather
> than in the toytoolkit.
>

It is not a bug in the compositor. It's a bug in toytoolkit.

Jasper St. Pierre wrote:
>
>> If a client adds a subsurface, we need to make sure it's allocated
>> properly, so queue a resize and redraw on the parent window.
>> ---
>>  clients/window.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/clients/window.c b/clients/window.c
>> index 5a1c8ec..df56bd9 100644
>> --- a/clients/window.c
>> +++ b/clients/window.c
>> @@ -4462,6 +4462,9 @@ window_add_subsurface(struct window *window, void
>> *data,
>>                 assert(!"bad enum subsurface_mode");
>>         }
>>  +      window->resize_needed = 1;
>> +       window_schedule_redraw(window);
>> +
>>         return widget;
>>  }
>>
>>
>


-- 
  Jasper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20131113/a2724dc0/attachment-0001.html>


More information about the wayland-devel mailing list