[PATCH 4/4] shell: put early default output assigment back

Kristian Høgsberg krh at bitplanet.net
Tue Nov 15 11:16:32 PST 2011


On Tue, Nov 15, 2011 at 4:51 AM, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> On Tue, 15 Nov 2011 11:45:43 +0200
> Pekka Paalanen <ppaalanen at gmail.com> wrote:
>
>> Partially revert: 46770139bceabb48ae0c2842f7f66d64fef26b6f
>> "shell: Set initial toplevel position in map callback"
>>
>> For instance, clients/terminal does the following requests for
>> creating its window:
>>
>> [3396044.386]  -> wl_compositor at 2.create_surface(new id 20)
>> [3396101.262]  -> wl_shell at 6.set_toplevel(wl_surface at 20)
>> [3396101.319]  -> wl_surface at 20.frame(new id 21)
>> [3396101.335]  -> wl_drm at 7.create_buffer(new id 22, 34, 702, 486,
>> 3072, 1)
>> [3396101.392]  -> wl_buffer at 22.damage(0, 0, 702, 486)
>> [3396101.433]  -> wl_surface at 20.attach(wl_buffer at 22, 0, 0)
>> [3396101.463]  -> wl_surface at 20.damage(0, 0, 702, 486)
>> [3396101.504]  -> wl_surface at 20.damage(0, 0, 702, 486)
>> [3396123.298]  -> wl_shell at 6.set_toplevel(wl_surface at 20)
>>
>> Before 4677013 'set_toplevel' assigned some output to the surface.
>> Now it relies on the first 'attach' call to assign an output. As
>> 'frame' request is ignored without an output set, terminal never
>> receives the first frame callback. It loops in dri2_swap_buffers()
>> forever and therefore appears to misbehave.
>>
>> Revert the part of 4677013 that removed the early output assignment
>> as a workaround.
>
> I know you hate this, but having all EGL clients hang is worse.
> You can revert this when there is a real fix.

I pushed the real fix now (needs a new list function from git master wayland).

Kristian

> Please.
>
>> Signed-off-by: Pekka Paalanen <ppaalanen at gmail.com>
>> ---
>>  compositor/shell.c |    4 ++++
>>  1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/compositor/shell.c b/compositor/shell.c
>> index 1936235..638b994 100644
>> --- a/compositor/shell.c
>> +++ b/compositor/shell.c
>> @@ -267,6 +267,10 @@ shell_set_toplevel(struct wl_client *client,
>>       if (es->map_type == WLSC_SURFACE_MAP_FULLSCREEN) {
>>               es->x = es->saved_x;
>>               es->y = es->saved_y;
>> +     } else if (es->map_type == WLSC_SURFACE_MAP_UNMAPPED) {
>> +             /* assign to first output */
>> +             es->output =
>> container_of(es->compositor->output_list.next,
>> +                                       struct wlsc_output, link);
>>       }
>>
>>       wlsc_surface_damage(es);
>
>


More information about the wayland-devel mailing list